6 Just write :texmath:`formula` or simply `formula` for inline
7 formulas; for display formulas use a directive:
11 Inline formulas can also be written with |substitution| references:
13 .. |substitution| formula
15 Now you take this (in file foo.txt) and run::
17 mathhack.py foo.txt | rst2latex.py - foo.tex
19 which converts the roles/directives to ``raw:: latex`` directives or::
21 imgmathhack.py foo.txt | html.py - foo.html
23 which runs TeX (generating images into a subdirectory!) and converts
24 the roles/directives into ``img::`` directives. Quick, dirty and
27 To allow including preprocessed files, do::
29 mathhack.py included.txt > included.txt.mathhack
30 imgmathhack.py included.txt > included.txt.imgmathhack
32 and include ``included.txt.mathhack`` (imgmathhack.py will mangle this to
33 include ``included.txt.imgmathhack`` automatically). My makefile_ can do all
34 this for you (just set ENABLE_MATHHACK=1).
36 .. _makefile: ../make/Makefile.docutils
38 Note that the `<imgmathhack.py>`_ script relies on some external commands (see
39 the comments at its top). `tex_to_images` seems to be separately availiable
40 from the `speech_tools CVS`__
42 __ http://cvs.sf.net/viewcvs.py/*checkout*/emu/speech_tools/scripts/tex_to_images.prl?rev=HEAD
44 Also note that the scripts use regexps to "parse" the roles/directives, so
45 expect some bugs (e.g. don't try to split a formula into multiple lines inside