On Thu, Jun 12, 2008 at 9:25 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote:
> Interestingly, sphinx *doesn't* define it for me. One of the first things I
> did was "grep Cap" on the latex build directory.
> I updated sphinx from SVN pretty recently... I wonder if that has anything
> to do with it. If that doesn't fix it, yes, that sounds like something to
> report.
The sphinx highlighting module uses
pygments.formatters.latex.LatexFormatter which cycles through letters
using a command prefix which defaults to 'C'
def _create_stylecmds(self):
t2c = self.ttype2cmd = {Token: ''}
c2d = self.cmd2def = {}
cp = self.commandprefix
letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
first = iter(letters)
second = iter(letters)
firstl = first.next()
In sphinx.highlighting, I can override this default with commandprefix='PYGC'
and get the build to work,
class PygmentsBridge(object):
def __init__(self, dest='html', stylename='sphinx'):
self.dest = dest
if not pygments:
return
if stylename == 'sphinx':
style = SphinxStyle
elif '.' in stylename:
module, stylename = stylename.rsplit('.', 1)
style = getattr(__import__(module, None, None, ['']), stylename)
else:
style = get_style_by_name(stylename)
self.hfmter = {False: HtmlFormatter(style=style),
True: HtmlFormatter(style=style, linenos=True)}
self.lfmter = {False: LatexFormatter(style=style, commandprefix='PYGC'),
True: LatexFormatter(style=style, linenos=True,
commandprefix='PYGC')}
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel