Skip to content

Latest commit

 

History

History
137 lines (99 loc) · 3.96 KB

readme-jac-mathjax.md

File metadata and controls

137 lines (99 loc) · 3.96 KB
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

jacMathjax 0.0.9

Yellow CMS Extension for display of MathJax produced mathematical/scientific notion in LaTeX, MathML, or AsciiMath in your markdown page.

[--more--] jacMathJax a Yellow CMS Extension

Description

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].

Dependencies

There are no additional dependencies that need to be downloaded or installed.

Download and Install

  1. Download the [Zip] File and extract into your yellow extensions folder.
  2. 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.

Configurations

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>',
);

Using in your Site

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}.$$`

Help

Some Help from author on github discussionsr. Lots of great help at MathJax site. You can see more examples on authors site.

Authors

[https://github.com/jacmgr]

Version History

  • 0.0.9 2024-04-13 Yellow CMS update 0.9.3

License

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

Acknowledgments

Thanks to Datenstrom Yellow CMS team. It really is FUN!