Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#35 syntax highlighting

closed-out-of-date
nobody
None
5
2011-09-16
2006-11-13
Gaël Varoquaux
No

This patch adds a new directive:

.. code-block:: python

This directive allows for syntax highlighting of python
code blocks. Other languages are not highlighted and
passed as literal blocks. Support for these language
can be added later on. This new directive allows for
language compatibility with trac.

Discussion

  •  
    Attachments
  • David Goodger
    David Goodger
    2006-11-13

    Logged In: YES
    user_id=7733

    Your patch doesn't include the docutils.colorizer module
    referenced. Could you add that please? Thanks.

     
  •  
    Attachments
  • Logged In: YES
    user_id=1330784

    Oops ! Here is a more complete patch. This time I don't
    think I have forgotten anything.

     
  •  
    Attachments
  • Logged In: YES
    user_id=1330784
    Originator: YES

    Here is a new version of the patch with an improved newlatex support.

     
  • Günter Milde
    Günter Milde
    2011-09-16

    • status: open --> closed-out-of-date
     
  • Günter Milde
    Günter Milde
    2011-09-16

    There is now support for syntax highlight of not only Python but a large set of programming and markup languages via Pygments with the "code" directive and role. For language compatibility, "code-block" and "sourcecode" aliases to the "code" directive could be added.