Name | Last modified | Size | Description | |
---|---|---|---|---|
Parent Directory | - | |||
for-else-test.py.pdf | 2012-01-03 12:41 | 76K | ||
for-else-test.py.htm | 2012-01-03 12:41 | 8.8K | ||
for-else-test.py.tex | 2012-01-03 12:41 | 4.8K | ||
rst2latex-pygments | 2012-01-03 12:41 | 2.0K | ||
rst2html-pygments | 2012-01-03 12:41 | 2.0K | ||
for-else-test.py | 2012-01-03 12:41 | 1.8K | ||
for-else-test.py.txt | 2012-01-03 12:41 | 1.8K | ||
The example code in "Using Pygments in ReST documents" defines a new "sourcecode" directive. The directive takes one argument language and uses the Pygments source highlighter to parse and render its content as a colourful source code block.
Combining the pygments example code with the standard docutils front-ends, results in front-end scripts generating output documents with syntax colour. For consistency with the majority of existing add-ons, the directive is renamed to "code-block".
The disadvantages lead to the alternative implementation with the demonstrator front ends rst2html-highlight and rst2latex-highlight.
text source: | for-else-test.py.txt |
---|---|
HTML: | for-else-test.py.htm |
LaTeX: | for-else-test.py.tex |
PDF: | for-else-test.py.pdf |
CSS stylesheet: | pygments-default.css |
---|---|
LaTeX style: | pygments-default.sty |