Skip to content

kramdown-math-mathjaxnode uses mathjax-node to convert math elements to MathML on the server side

License

Notifications You must be signed in to change notification settings

kramdown/math-mathjaxnode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Important: This repo and gem are unmaintained! If you are interested in maintaining, please contact me at t_leitner@gmx.at.

kramdown math engine for conversion to MathML

This is a converter for kramdown that uses 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

gem install kramdown-math-mathjaxnode

Usage

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

The Mathjax-Node engine supports the following keys of the option math_engine_opts:

  • semantics:

    Specifies whether TeX code should be added in a <semantics> tag. It defaults to false but if set to true, a <semantics> 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.

About

kramdown-math-mathjaxnode uses mathjax-node to convert math elements to MathML on the server side

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published