I need to convert a document that was written in TeX to some other format.
The other format supports a TeX style mathmode, so I would like to turn every mathmode formula into verbatim.
I tried turning each formula into a verbatim environment, but this does not work, as an end statement has to be visible at the same time as an begin statement is encountered.
How can I achieve something like that?
pandoc et al are not an option. There is too much customization in the TeX processor used for those documents to work.
A small example:
I would like the input
$$ \left\{ \min_{3, 5} \right\} $$
To be output as exactly that, without having to modify the .tex files.
More explanation of what I'm doing here:
I have a huge style file, which defines a domain specific language for documentation, and a custom (somewhat conforming) latex interpreter that is used to output HTML code. I want to transfer the current LaTeX documents into a new document format. For that I'm modifying the style-files to adapt some constructs to the new format. The mathmode constructs are especially troubling and always get modified in ways I cannot really comprehend. Thus, I'm asking if there is a standard way to turn every latex formula into its verbatim equivalent.
TeXlooks like and what the output should be, in its new format? A script (pythonorperlorawk) may be your best bet. – Ethan Bolker Jun 15 '12 at 12:34:(– egreg Jun 15 '12 at 13:00