[texhax] Integrating LaTeX and external program with auxiliar file
José Romildo Malaquias
j.romildo at gmail.com
Sat Apr 24 11:46:32 CEST 2010
In order to implement a package for highlighting source code in LaTeX
with the help of the external program pygmentize
(http://www.pygments.org), I am considering the following procedure:
1) first compilation of the document: the contents of every ocorrences
of the 'pygments' environment are colected and written to the
auxiliar file \jobname.pygments.
2) an auxiliar program pygmentex processes the auxiliar file
\jobname.pygments, replacing every snippet of source code by a
highlighted version, using the pygments system, producing a new
auxiliar file \jobname.pygmented.
3) second compilation of the document: the contents of the 'pygments'
environment, now already hightlighted, are recovered from the
\jobname.pygmented file, and used in the final typesetting of the
document.
I am looking for references on how to implement this procedure in
LaTeX. Any help?
Regards,
Romildo
More information about the texhax
mailing list