removed obsolete issues (many of them fixed with AE)
[docutils.git] / sandbox / cben / rolehack / README.txt
blob047051cccb79b90291b9aaf50e2569076056b7b9
1 Mathhack Instructions
2 =====================
4 ::
6    Just write :texmath:`formula` or simply `formula` for inline
7    formulas; for display formulas use a directive:
9    .. texmath:: formula
11    Inline formulas can also be written with |substitution| references:
13    .. |substitution| formula
14    
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
25 convenient ;-).
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
46 a table cell...).