mathjax-tex-woff/README.md

39 lines
1.6 KiB
Markdown

# MathJax TeX woff
mathjax-tex-woff is a minimal [MathJax](https://www.mathjax.org/) package optimized to work with TeX syntax and woff fonts.
This repo is a copy of [Tibor Simon's Github](https://github.com/tiborsimon/mathjax-minimal-package) without the `MathJax-2.6.1-base` dir.
## Usage
To download: `$ git clone https://git.brz9.dev/ed/mathjax-tex-woff.git`
In the head of your html page, load `MathJax.js` with the config setting:
`<script type="text/javascript" async src="path/to/mathjax-tex-woff/MathJax.js?config=TeX-AMS_CHTML"></script>`
Before the closing `</body>` tag add the following script:
```
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true
}
});
</script>
```
### Styling with CSS
Since this package uses MathJax's CHTML output, the color can be set directly in the html tag.
[Here](https://file.brz9.dev/web/mathjax-tex-woff/exemple/taylor.html) is an exemple
For more info:
* [MathJax Documentation](https://docs.mathjax.org/en/v2.7-latest/tex.html)
* [The original blog post by Tibor Simon](https://tiborsimon.io/articles/web/minimal-mathjax/)
* [WikiBook on TeX Math syntax](https://en.wikibooks.org/wiki/LaTeX/Mathematics)
## License
While **MathJax** is released under the [Apache License](https://github.com/mathjax/MathJax-src/blob/master/LICENSE), Tibor Simon made his build available under the [MIT License](https://github.com/tiborsimon/mathjax-minimal-package/blob/master/LICENSE) (wich is an okay thing to do, to the best of my knowledge) so I'll follow his wish.