Michel Dagenais Michel Dagenais, GNU General Public License, 1997
8 October 1997 HTML TeX documentation m3totex narrow audience

# M3textohtml: From the M3totex Literate Programming System to M3doc

This program was used to ease the transition from M3totex to M3doc as a literate programming system. Once all Modula-3 interfaces containing TeX commands are translated, it will become useless.

A number of Modula-3 interfaces, generic interfaces, and some modules, contained TeX commands. This program converts most common TeX commands embedded in Modula-3 comments to their equivalent HTML tag. It reads a TeX commented Modula-3 unit from standard input, prints messages about unrecognized TeX commands, and outputs the translated unit to standard output.

Bibliographic references (\cite{}) are converted to hypertext links into a file named `references.html` in the package `src` directory. The actual bibliographic entries need to be entered into that file.

While most TeX commands are translated properly, some final manual adjustments may be needed. Often, TeX commands embedded into strings in quoted, backquoted, index or verbatim sections are not processed.

A shell script, `tex2ht`, is provided to run `m3textohtml` over all interface files in several Modula-3 packages. Use with caution and always keep a copy of these packages as the conversion is done in place.

The number of files within SRC Modula-3 which required conversion is approximately 250 interfaces and 30 modules. This information was obtained by searching for \ in all the .i3, .ig, .m3, and .mg files. While any file with a \ may contain TeX commands, a smaller subset is more likely: those with \ followed by something else than the usual Modula-3 escape sequences (\n, \r, \" ...). This information is provided below for modules and interfaces.

- A list of interfaces converted using m3textohtml, with the unrecognized TeX commands in each
- A list of all modules with \ which are not M3 escape sequence and may require conversion