# FooTeX

FooTex is software for converting LaTeX math markup into mathml, html, or png. It is basically just a wrapper for texvc and blahtex. It provides some extra functionality, and gives a consistent interface to the functionality of the two underlying packages. The documentation is built into the source code. When you install footex, the documentation will be installed as a man page.

Software: footex.tar.gz

For convenience, FooTex is distributed along with texvc and blahtex. Texvc is part of MediaWiki. Blahtex was originally written by David Harvey, and texvc by Tomasz Wegrzanowski. David Harvey no longer maintains blahtex, but Gilles Van Assche packages an extended version of it called blahtexml, which also includes the blahtex executable used by FooTex; this is the version that is distributed along with footex.

The following is a list of debian packages that suffices to build everything:

ocaml-core
g++
dvipng
texlive-full
libxerces-c2-dev

To build everything and install everything on linux:

make
make install

On BSD, you'll need to use gmake, and you may want to fiddle with the directory the executables are installed into.

## man page

FOOTEX(1)                         Footex 0.4                         FOOTEX(1)

NAME
FooTex - conversion of LaTeX math markup to mathml, html, or png

SYNOPSIS
footex [options]

footex [options] inputfile outputfile [outputfile2] [outputfile3]

footex --mathml a.tex a.xml

footex --html a.tex a.html

footex --png --png-file a.png a.tex a.html info

DESCRIPTION
Footex is a wrapper for two other pieces of software, blahtex and
texvc. It provides a consistent interface to both of them.  It also
builds on blahtex to handle math markup that blahtex wouldn't be able
to handle directly. For instance, it can generate mathml from the
following input, which plain blahtex wouldn't be able to handle:
\beginalign*
y &= x^2 \\
\intertextand therefore, since $x=3$,
&= 9
\endalign* Other functionality that footex supplies in
addition to blahtex's is correct translation of the following macros:
\, : \; \quad \qquad \ Footex also allows html output to be
generated by texvc in cases where private macros have been defined.

OPTIONS
In addition to the following options, FooTex accepts any of blahtex's
options.

--mathml
Convert to mathml.

--html  Convert to html. The resulting markup will, for example, use
html tables to make built-up fractions. This will only work in
simple cases.

--png   Convert to a bitmap. The second output file is a snippet of
html code that will display the bitmap with the proper
baseline.  The third output file has two lines; the first line
is the height in pixels, and the second is the depth in pixels.

--prepend-file prepend.tex
This is sort of like prepending the file prepend.tex to the tex
input. This can be used to define macros used in the equation
to be converted. The way this is actually handled internally is
that footex tries to interpret any \newcommands in prepend.tex,
and then tries to expand all those macros in the input, before
handing it off to blahtex or texvc for conversion. This will
only work for commands that have less than three arguments, and
it will not work if the definition of the command includes
optional arguments.

--standalone
Used with mathml output, causes the output to be a complete
w3c-compliant xhtml file that can be viewed in a web browser.

--help  Print brief information about the software.

OTHER INFORMATION
FooTex's web page is at

http://www.lightandmatter.com/footex/footex.html   .

AUTHOR
FooTex was written by Ben Crowell,
http://www.lightandmatter.com/personal/.  FooTex is little more than a
wrapper for blahtex, by David Harvey, and texvc, by Tomasz
Wegrzanowski. David Harvey no longer maintains blahtex, but Gilles Van
Assche packages an extended version of it called blahtexml, which also
includes the blahtex executable used by FooTex.

Copyright (C) 2007 by Benjamin Crowell.

FooTex is free software; you can redistribute it and/or modify it under
the terms of the GPL, or, optionally, Perl's license.

0.4                               2009-11-30                         FOOTEX(1)