Skip to content

Category Archives: reStructuredText

Using Pygments with docutils

Pygments has a very short tutorial for integrating itself with docutils here: http://pygments.org/docs/rstdirective/. However, that was not enough info to get me started using Pygments with rst2html.py. Here are the missing steps: Copy the Pygments supplied rst-directive.py to your docutils installation. Something like: cp Pygments/external/rst-directive.py \ …/site-packages/docutils/parsers/rst/directives/rst_directive.py Notice that rst-directive.py became rst_directive.py (dash changed to [...]