Title | Project | Purpose | sequence | lastupdate | tag | version | mathjax |
---|---|---|---|---|---|---|---|
Readme - jacMathjax |
Yellow CMS - jacMathjax |
Drafting of a Project README File |
readme-100 |
2024-04-03 |
readme, functionality |
0.0.9 |
true |
Yellow CMS Extension for display of MathJax produced mathematical/scientific notion in LaTeX, MathML, or AsciiMath in your markdown page.
Mathjax library is JavaScript and works mostly over the internet. It takes your prepared markup (LaTeX/MathML/AsciiMath) and transforms it to an HTML output that you capture and display n your webpage. This extensions simply provides access to that capability from within [Yellow].
There are no additional dependencies that need to be downloaded or installed.
- mathjax: is used from its CDN : [https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML]
- yellow cms: You already got that or you wouldn't be here!
- Download the [Zip] File and extract into your yellow extensions folder.
- The structure of the files should be
+---workers
| | jacmathjax.php
| | |
| +---jac
| | |
| | +---jacmathjax
| | | | jacmathjax-cfg.php
| | | | jacmathjax-ext.php
| | | | jacmathjax.php
| | | +---lib
| | | MathJax.js
| | |
Note the file workers/jacmathjax.php is simply a method that allows me to choose where to put my extensions. I like to keep my stuff grouped together.
<?php
require_once 'jac/jacmathjax/jacmathjax-ext.php';
You will need to copy that one file up to the main yellow extension folder, so that yellow can find the extension.
You should not need to change or adjust the seperate configuration file. However, if you are an expert MathJax person you could add your additionl MathJax Plugins here.
$this->config = array(
'using_script' => 'LOCAL',
'usingExtraHTML' => true,
'CDN' => 'https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML',
'LOCAL' => 'MathJax.js?config=TeX-MML-AM_CHTML',
'template' => '<script type="text/javascript" src="%mathjax_script%"></script>',
);
On pages where you use LaTeX, MathML, or AsciiMath, add the Meta Field mathjax: true
. That's it!
Example Page Source Markdown
---
Title: My sample page
mathjax: true
---
```
<p>
When ``$a \ne 0$`` , there are two solutions to ``\(ax^2 + bx + c = 0\)`` and they are
``$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$``
</p>
```
<p>
When `$a \ne 0$`, there are two solutions to `\(ax^2 + bx + c = 0\)` and they are
`$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$`
</p>
Produces:
<p>
When ``$a \ne 0$`` , there are two solutions to ``\(ax^2 + bx + c = 0\)`` and they are
``$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$``
</p>
When `$a \ne 0$`, there are two solutions to `\(ax^2 + bx + c = 0\)` and they are `$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$`
Some Help from author on github discussionsr. Lots of great help at MathJax site. You can see more examples on authors site.
- 0.0.9 2024-04-13 Yellow CMS update 0.9.3
I have no idea and need no ackknowledgement for my work. You should however, observer the license from MathJax
This project is licensed under the [NAME HERE] License - see the LICENSE.md file for details
Thanks to Datenstrom Yellow CMS team. It really is FUN!