# Index of /dev/t2t_math_ml

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

Math Formulas in txt2tags with t2t_math_ml

# Presentation

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

# Requirements

Tested with:

• txt2tags version 2.6
• perl v5.14.2
• latexmlmath included in LaTeXML version 0.7.0 (at least on Ubuntu, it can be obtained with: sudo apt-get install latexml)

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). ## Compilation $ txt2tags -t xhtml -o test.xhtml0 test.t2t
\$ ./t2t_math_ml test.xhtml0


creates test.xhtml.

# Project Management

## Issues

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

## Changelog

• [2015-10-28] t2t_math_ml-02: put it on GitHub: change the doc and the Makefile, add a LICENSE.
• [2013-09-03] t2t_math_ml-01: first distributed version.