[Python-checkins] r64193 - doctools/trunk/sphinx/highlighting.py

georg.brandl python-checkins at python.org
Thu Jun 12 21:47:06 CEST 2008


Author: georg.brandl
Date: Thu Jun 12 21:47:06 2008
New Revision: 64193

Log:
Add a commandprefix to the latex formatter to override
Pygments 0.9's awkward 'C' default.


Modified:
   doctools/trunk/sphinx/highlighting.py

Modified: doctools/trunk/sphinx/highlighting.py
==============================================================================
--- doctools/trunk/sphinx/highlighting.py	(original)
+++ doctools/trunk/sphinx/highlighting.py	Thu Jun 12 21:47:06 2008
@@ -94,8 +94,9 @@
             style = get_style_by_name(stylename)
         self.hfmter = {False: HtmlFormatter(style=style),
                        True: HtmlFormatter(style=style, linenos=True)}
-        self.lfmter = {False: LatexFormatter(style=style),
-                       True: LatexFormatter(style=style, linenos=True)}
+        self.lfmter = {False: LatexFormatter(style=style, commandprefix='PYG'),
+                       True: LatexFormatter(style=style, linenos=True,
+                                            commandprefix='PYG')}
 
     def highlight_block(self, source, lang, linenos=False):
         def unhighlighted():


More information about the Python-checkins mailing list