https://github.com/kramdown/math-mathjaxnode
kramdown-math-mathjaxnode uses mathjax-node to convert math elements to MathML on the server side
https://github.com/kramdown/math-mathjaxnode
kramdown markdown mathjax-node
Last synced: 8 months ago
JSON representation
kramdown-math-mathjaxnode uses mathjax-node to convert math elements to MathML on the server side
- Host: GitHub
- URL: https://github.com/kramdown/math-mathjaxnode
- Owner: kramdown
- License: other
- Created: 2019-01-12T10:42:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-27T22:06:53.000Z (about 7 years ago)
- Last Synced: 2025-02-24T19:49:55.894Z (about 1 year ago)
- Topics: kramdown, markdown, mathjax-node
- Language: Ruby
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
**Important: This repo and gem are unmaintained! If you are interested in
maintaining, please contact me at .**
# kramdown math engine for conversion to MathML
This is a converter for [kramdown](https://kramdown.gettalong.org) that uses
[Mathjax-Node](https://github.com/mathjax/MathJax-node) to convert math
formulas to MathML.
Note: Until kramdown version 2.0.0 this math engine was part of the kramdown
distribution.
## Installation
~~~ruby
gem install kramdown-math-mathjaxnode
~~~
## Usage
~~~ruby
require 'kramdown'
require 'kramdown-math-mathjaxnode
Kramdown::Document.new(text, math_engine: :mathjaxnode).to_html
~~~
## Documentation
To use Mathjax-Node, set the option `math_engine` to 'mathjaxnode' and make sure that both
[Node.js](https://nodejs.org/) and Mathjax-Node are available. The Mathjax-Node library can be
installed, e.g., via npm by running `npm install -g mathjax-node`. Instructions for installing
Node.js can be found in the [joyent/node wiki](https://github.com/joyent/node/wiki/Installation).
The Mathjax-Node engine supports the following keys of the option `math_engine_opts`:
* semantics:
Specifies whether TeX code should be added in a `` tag. It defaults to `false` but if
set to `true`, a `` tag with the LaTeX code itself is added.
* texhints:
Specifies whether TeX-specific classes should be added. It defaults to `true` but if set to
`false`, the TeX-specific classes, like `MJX-TeXAtom-ORD`, will not be added. These classes
provide styling hints to the MathJax browser library.
## Development
Clone the git repository and you are good to go. You probably want to install
`rake` so that you can use the provided rake tasks.
## License
MIT - see the **COPYING** file.