Index of /dev/t2t_math_ml

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  
[TXT]txt2tags.css2015-10-28 17:40 2.8K 
[   ]test.xhtml2015-10-28 17:40 6.2K 
[   ]test.t2t2015-10-28 17:40 1.7K 
[   ]test.pdf2015-10-28 17:40 96K 
[   ]t2t_math_ml-0.2.tgz2015-10-28 17:40 11K 
[   ]t2t_math_ml-0.1.tgz2013-09-03 17:58 105K 
[TXT]README.html2015-10-28 17:40 4.4K 

Math Formulas in txt2tags with t2t_math_ml


t2t_math_ml is a PERL script to be used together with txt2tags in order to translate formulas to MathML in the generated web pages.

It takes the xhtml file generated by txt2tags where the formulas are still in LaTeX format, filter them out to translate them using latexmlmath and put them back in the result file.

LaTeXML is used to generate the NIST Digital Library of Mathematical Functions, so it should be powerful enough for small formulas ;-)


Tested with:

But it might work with other versions.

Get It


You can get if from GitHub, or download the last pre-packed version:


$ tar -zxvf t2t_math_ml-0.1.tgz

and the script, called t2t_math_ml, is in there.

The Makefile is only needed to compile the test, or to generation the documentation (this file) to other formats ( md or html).

Quick Start

Input file

In the txt2tags input file, the LaTeX formulas can be inline:

like this: ''$x = \sqrt{y+z}$''

Or in a one line block:

''' $$ x = \sqrt{a + b + c} $$

Or in a math block on one or several lines:

|x| = \left\{ \begin{array}{rl}
 -x & \mbox{ if } x<0 \\
  x & \mbox{ otherwise}
       \end{array} \right.

See some examples here ( source, xhtml, pdf ).

Some examples of LaTeX formulas can be found in LaTeX Cookbook.

You might need to add :

    %!postproc(xhtml): "<head>" '<head><meta http-equiv="Content-type" content="application/xhtml+xml;charset=UTF-8"/>'

in your t2t source file to be able to seen the MathML formulas (see in the test file).


    $ txt2tags -t xhtml -o test.xhtml0 test.t2t
    $ ./t2t_math_ml test.xhtml0

creates test.xhtml.

Project Management


The current version is a first try, but should work in simple cases. See GitHub issues for known problems, and please report there for any remark (bug, feature wish, etc).