Re: latex + pygments

Guenter Milde via Docutils-users <[email protected]> Sun, 15 Jan 2023 20:39:59 -0000 (UTC)
Newsgroups gmane.text.docutils.user
Message-ID <[email protected]>
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



_______________________________________________
Docutils-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.