On 2023-01-15, Alan G. Isaac wrote:
> What is the current status of pygments support
> for LaTeX writers?
Syntax highlighting with Pygments is implemented in Docutils since
version 0.9.
Code is parsed by the Pygments syntax highlighter and tokens are
stored in nested inline elements with class arguments according to their
syntactic category.
As inline elements are supported by all writers, no change is required on
the writer side.
The actual highlighting requires a style-sheet (e.g. one generated by
Pygments, see the sandbox/stylesheets for examples).
See
https://docutils.sourceforge.io/docs/ref/rst/directives.html#code
https://docutils.sourceforge.io/docs/user/config.html#syntax-highlight
and just try it out.
Günter Milde
|