Showing entries 1 to 1
Displaying posts with tag: pygments (reset)
Including Code Samples With rst2pdf

Every document I create these days is written in rst (ReStructuredText) and transformed into something useful using rst2pdf. This includes worksheets, reports, handouts and slide decks. Along the way I've learned a few tricks, and I try to write them down so I can look up how to do something. If this helps you too, then great :)

Start Simple

Include a code block in rst by adding something like this:


.. code-block:: php

Your code must then be indented, and the style persists until you "undent" again. There is pretty extensive language/syntax support since it is built on pygments, so you can use most language names instead of the php there.

Line Numbers and PHP Tags

In order to make the PHP syntax highlight …

[Read more]
Showing entries 1 to 1