I would like to find out what options there are for applying syntax highlighting to Plain TeX, to turn Plain TeX documents into highlighted HTML.
The aim is to facilitate sharing tracked changes to the Plain TeX document. The document I wish to work with is fairly simple, but it does hand define several fonts, a bibliography environment, and make heavy use of \halign
macros. Some automatic or semi-automatic handling of these would be an advantage. At a pinch I could do this with a sed
script, but I would rather save myself some time.
Pygments does not seem to have support for Plain TeX. Emacs' AUCTeX has TeX-mode
for Plain TeX, but although I seem to recall that it is possible to export HTML from AUCTeX, I cannot recall any details.
listings
package to highlight plain TeX.listings
will help me get HTML output.Vim
can highlight both plain TeX and LaTeX. Open your file withVim
, make sure the plain TeX syntax is selected, then use this magic trick::TOhtml
. The color scheme together with your file will be exported to ahtml
file right in yourVim
buffer.:)