Full rebuild in order

I finished moving all of the PNG reading/writing to its own module. A full rebuild is probably required after this change to ensure everything is working correctly.

Cheers,
Mike

···

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

src/_png.cpp: No such file or directory

Looks like an svn add is needed...

JDH

···

On Wed, Jun 11, 2008 at 10:52 AM, Michael Droettboom <mdroe@...31...> wrote:

I finished moving all of the PNG reading/writing to its own module. A
full rebuild is probably required after this change to ensure everything
is working correctly.

Thanks. Done.

John Hunter wrote:

···

On Wed, Jun 11, 2008 at 10:52 AM, Michael Droettboom <mdroe@...31...> wrote:
  

I finished moving all of the PNG reading/writing to its own module. A
full rebuild is probably required after this change to ensure everything
is working correctly.
    
src/_png.cpp: No such file or directory

Looks like an svn add is needed...

JDH
  
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

I wonder is there is some python 2.5 is creeping in somewhere. I am
experiencing the same mathtext problem I pointed out earlier: This
isn't related to your recent commit, but was introduced in r5380

  934 rm -rf build ~/dev/lib/python2.4/site-packages/matplotlib*
  935 sudo rm -rf build ~/dev/lib/python2.4/site-packages/matplotlib*
  936 rm -rf ~/.matplotlib/fontManager.cache ~/.matplotlib/tex.cache/
~/.matplotlib/ttffont.cache
  937 cd ~/python/svn/
  938 make local_mpl
  939 cd ~/mpl/examples/pylab_examples/
  940 python mathtext_demo.py

I'm going to dig into this, but just wanted to let you know in case
something jumps out at you.

Traceback (most recent call last):
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
line 331, in expose_event
    self._render_figure(self._pixmap, w, h)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py",
line 75, in _render_figure
    FigureCanvasAgg.draw(self)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py",
line 256, in draw
    self.figure.draw(self.renderer)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/figure.py",
line 825, in draw
    for a in self.axes: a.draw(renderer)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/axes.py",
line 1502, in draw
    a.draw(renderer)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/axis.py",
line 687, in draw
    self.label.draw(renderer)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/text.py",
line 298, in draw
    bbox, info = self._get_layout(renderer)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/text.py",
line 197, in _get_layout
    w, h, d = renderer.get_text_width_height_descent(
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py",
line 134, in get_text_width_height_descent
    ox, oy, width, height, descent, fonts, used_characters = \
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/mathtext.py",
line 2714, in parse
    box = self._parser.parse(s, font_output, fontsize, dpi)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/mathtext.py",
line 2188, in parse
    self._expression.parseString(s)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 1049, in parseString loc, tokens = self._parse( instring, 0 )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2560, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2308, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2673, in parseImpl
    loc, tokens = self.expr._parse( instring, loc, doActions,
callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2308, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2757, in parseImpl
    loc, tokens = self.expr._parse( instring, loc, doActions,
callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2707, in parseImpl
    loc, tokens = self.expr._parse( instring, loc, doActions,
callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2354, in parseImpl
    loc2 = e.tryParse( instring, loc )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 967, in tryParse
    return self._parse( instring, loc, doActions=False )[0]
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2560, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2417, in parseImpl
    ret = e._parse( instring, loc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2560, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2560, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2417, in parseImpl
    ret = e._parse( instring, loc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2294, in parseImpl
    loc, resultlist = self.exprs[0]._parse( instring, loc, doActions,
callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2757, in parseImpl
    loc, tokens = self.expr._parse( instring, loc, doActions,
callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2560, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2354, in parseImpl
    loc2 = e.tryParse( instring, loc )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 967, in tryParse
    return self._parse( instring, loc, doActions=False )[0]
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2560, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2294, in parseImpl
    loc, resultlist = self.exprs[0]._parse( instring, loc, doActions,
callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2294, in parseImpl
    loc, resultlist = self.exprs[0]._parse( instring, loc, doActions,
callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2304, in parseImpl
    raise ParseSyntaxException(pe)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 216, in __init__
    super(ParseSyntaxException, self).__init__(
TypeError: super() argument 1 must be type, not classobj

···

On Wed, Jun 11, 2008 at 11:24 AM, Michael Droettboom <mdroe@...31...> wrote:

Thanks. Done.

It's related to my recently updating pyparsing.py... It seems that it isn't Python 2.4 compatible anymore.

I'd like to workaround the definiciences in the new pyparsing.py if I can (rather than simply revert) as the error messages are much more specific with the new version.

I have submitted a workaround to this specific problem. Can you please let me know if it resolves your issue?

Mike

John Hunter wrote:

···

On Wed, Jun 11, 2008 at 11:24 AM, Michael Droettboom <mdroe@...31...> wrote:
  

Thanks. Done.
    
I wonder is there is some python 2.5 is creeping in somewhere. I am
experiencing the same mathtext problem I pointed out earlier: This
isn't related to your recent commit, but was introduced in r5380

  934 rm -rf build ~/dev/lib/python2.4/site-packages/matplotlib*
  935 sudo rm -rf build ~/dev/lib/python2.4/site-packages/matplotlib*
  936 rm -rf ~/.matplotlib/fontManager.cache ~/.matplotlib/tex.cache/
~/.matplotlib/ttffont.cache
  937 cd ~/python/svn/
  938 make local_mpl
  939 cd ~/mpl/examples/pylab_examples/
  940 python mathtext_demo.py

I'm going to dig into this, but just wanted to let you know in case
something jumps out at you.

Traceback (most recent call last):
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
line 331, in expose_event
    self._render_figure(self._pixmap, w, h)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py",
line 75, in _render_figure
    FigureCanvasAgg.draw(self)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py",
line 256, in draw
    self.figure.draw(self.renderer)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/figure.py",
line 825, in draw
    for a in self.axes: a.draw(renderer)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/axes.py",
line 1502, in draw
    a.draw(renderer)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/axis.py",
line 687, in draw
    self.label.draw(renderer)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/text.py",
line 298, in draw
    bbox, info = self._get_layout(renderer)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/text.py",
line 197, in _get_layout
    w, h, d = renderer.get_text_width_height_descent(
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py",
line 134, in get_text_width_height_descent
    ox, oy, width, height, descent, fonts, used_characters = \
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/mathtext.py",
line 2714, in parse
    box = self._parser.parse(s, font_output, fontsize, dpi)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/mathtext.py",
line 2188, in parse
    self._expression.parseString(s)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 1049, in parseString loc, tokens = self._parse( instring, 0 )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2560, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2308, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2673, in parseImpl
    loc, tokens = self.expr._parse( instring, loc, doActions,
callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2308, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2757, in parseImpl
    loc, tokens = self.expr._parse( instring, loc, doActions,
callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2707, in parseImpl
    loc, tokens = self.expr._parse( instring, loc, doActions,
callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2354, in parseImpl
    loc2 = e.tryParse( instring, loc )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 967, in tryParse
    return self._parse( instring, loc, doActions=False )[0]
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2560, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2417, in parseImpl
    ret = e._parse( instring, loc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2560, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2560, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2417, in parseImpl
    ret = e._parse( instring, loc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2294, in parseImpl
    loc, resultlist = self.exprs[0]._parse( instring, loc, doActions,
callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2757, in parseImpl
    loc, tokens = self.expr._parse( instring, loc, doActions,
callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2560, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2354, in parseImpl
    loc2 = e.tryParse( instring, loc )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 967, in tryParse
    return self._parse( instring, loc, doActions=False )[0]
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2560, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2294, in parseImpl
    loc, resultlist = self.exprs[0]._parse( instring, loc, doActions,
callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2294, in parseImpl
    loc, resultlist = self.exprs[0]._parse( instring, loc, doActions,
callPreParse=False )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 982, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 925, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 2304, in parseImpl
    raise ParseSyntaxException(pe)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyparsing.py",
line 216, in __init__
    super(ParseSyntaxException, self).__init__(
TypeError: super() argument 1 must be type, not classobj
  
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

I also notice you upgraded pyparsing in that revision, so that may be
the source of the problems. I'm tried reverting pyparsing alone in
hopes that that would give us a clue, but it appears you are using
some of the new features, because I now get:

  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/mathtext.py",
line 2714, in parse
    self.__class__._parser = Parser()
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/mathtext.py",
line 2027, in __init__
    start_group = (Optional(latexfont) - lbrace)
TypeError: unsupported operand type(s) for -: 'Optional' and 'Suppress'

···

On Wed, Jun 11, 2008 at 11:53 AM, John Hunter <jdh2358@...149...> wrote:

On Wed, Jun 11, 2008 at 11:24 AM, Michael Droettboom <mdroe@...31...> wrote:

Thanks. Done.

I wonder is there is some python 2.5 is creeping in somewhere.

That did it, I'll let you know if I see anything else. What version
of docutils are you on? Now I am using docutils-0.4-py2.4.egg
getting:

  File "/opt/tradelink/share/research/site-packages.beta/Sphinx-0.3-py2.4.egg/sphinx/application.py",
line 123, in setup_extension
    raise ExtensionError('Could not import extension %s' % extension, err)
ExtensionError: Could not import extension math_symbol_table
(exception: cannot import name Directive)

In [1]: import docutils

In [2]: docutils.__version__
Out[2]: '0.4'

···

On Wed, Jun 11, 2008 at 12:05 PM, Michael Droettboom <mdroe@...31...> wrote:

It's related to my recently updating pyparsing.py... It seems that it isn't
Python 2.4 compatible anymore.

I'd like to workaround the definiciences in the new pyparsing.py if I can
(rather than simply revert) as the error messages are much more specific
with the new version.

I have submitted a workaround to this specific problem. Can you please let
me know if it resolves your issue?

Ah. I've got 0.5. I was hoping I wouldn't have to do that crazy backward compatibility stuff that mathpng.py does, but it looks like I'll have to to support 0.4. I'll look into this.

Cheers,
Mike

John Hunter wrote:

···

On Wed, Jun 11, 2008 at 12:05 PM, Michael Droettboom <mdroe@...31...> wrote:
  

It's related to my recently updating pyparsing.py... It seems that it isn't
Python 2.4 compatible anymore.

I'd like to workaround the definiciences in the new pyparsing.py if I can
(rather than simply revert) as the error messages are much more specific
with the new version.

I have submitted a workaround to this specific problem. Can you please let
me know if it resolves your issue?
    
That did it, I'll let you know if I see anything else. What version
of docutils are you on? Now I am using docutils-0.4-py2.4.egg
getting:

  File "/opt/tradelink/share/research/site-packages.beta/Sphinx-0.3-py2.4.egg/sphinx/application.py",
line 123, in setup_extension
    raise ExtensionError('Could not import extension %s' % extension, err)
ExtensionError: Could not import extension math_symbol_table
(exception: cannot import name Directive)

In [1]: import docutils

In [2]: docutils.__version__
Out[2]: '0.4'
  
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

Ok. I think I have that worked out -- would you mind testing on docutils 0.4? (I don't think I broke anything that wasn't already broken...)

Cheers,
Mike

Michael Droettboom wrote:

···

Ah. I've got 0.5. I was hoping I wouldn't have to do that crazy backward compatibility stuff that mathpng.py does, but it looks like I'll have to to support 0.4. I'll look into this.

Cheers,
Mike

John Hunter wrote:
  

On Wed, Jun 11, 2008 at 12:05 PM, Michael Droettboom <mdroe@...31...> wrote:
  

It's related to my recently updating pyparsing.py... It seems that it isn't
Python 2.4 compatible anymore.

I'd like to workaround the definiciences in the new pyparsing.py if I can
(rather than simply revert) as the error messages are much more specific
with the new version.

I have submitted a workaround to this specific problem. Can you please let
me know if it resolves your issue?
    

That did it, I'll let you know if I see anything else. What version
of docutils are you on? Now I am using docutils-0.4-py2.4.egg
getting:

  File "/opt/tradelink/share/research/site-packages.beta/Sphinx-0.3-py2.4.egg/sphinx/application.py",
line 123, in setup_extension
    raise ExtensionError('Could not import extension %s' % extension, err)
ExtensionError: Could not import extension math_symbol_table
(exception: cannot import name Directive)

In [1]: import docutils

In [2]: docutils.__version__
Out[2]: '0.4'
  
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

OK, sorry I've been causing so much trouble, but I guess it is good
that at least one of works on python 2.4 sometimes.

What I really wanted to talk about is that I think this new support is
a killer feature, and I would like to see it widely accessible and
advertised. I think people will find the ability to do turnkey math
text to be useful in many contexts where a full blown tex/dvipng
install is impractical. This is particularly true for folks
distributing apps to windows. Potential use cases are math in GUI
buttons, menus and other widgets, math blitted into a vtk or other
canvas, webapp servers wanting to use math pngs etc...

So I'd like at a minimum to move your latex2png into the mathtext
module (or the text module or wherever it belongs), probably rename it
mathtext2png to avoid confusion, and import that function into the
mathpng sphinx extension. I also think we should provide a math2array
which returns an rgba array that people can do what they want with.
I'm happy to do all this easy stuff now that you have done the hard
part, but I just wanted to bounce it off you in case you had any
suggestions. I'm curious about a couple of things in the mathpng
func:

  * why do you hardcode the math font to be 'cm'?

  * why do you hardcode the dpi to be 120 -- is that just a stylistic
choice? BTW, in semi-related news, it appears sphinx (at least my
version) ignores the scale on the image directives, which is why the
html images appear large and the PDF ones appear small. This is odd,
because on my system rst2html respects the scale directive so it
appears to be a buglet.

Very nice work on the auto-generated symbol tables, btw. I am eagerly
studying this sphinxext stuff -- very powerful. You know, Stefan
called for a sphinx presentation the other day for scipy 08, and I
think this kind of stuff would make a great talk if you are planning
on attending.

JDH

···

On Wed, Jun 11, 2008 at 12:25 PM, Michael Droettboom <mdroe@...31...> wrote:

Ok. I think I have that worked out -- would you mind testing on docutils
0.4? (I don't think I broke anything that wasn't already broken...)

John Hunter wrote:

  

Ok. I think I have that worked out -- would you mind testing on docutils
0.4? (I don't think I broke anything that wasn't already broken...)
    
OK, sorry I've been causing so much trouble, but I guess it is good
that at least one of works on python 2.4 sometimes.

What I really wanted to talk about is that I think this new support is
a killer feature, and I would like to see it widely accessible and
advertised. I think people will find the ability to do turnkey math
text to be useful in many contexts where a full blown tex/dvipng
install is impractical. This is particularly true for folks
distributing apps to windows. Potential use cases are math in GUI
buttons, menus and other widgets,

There is the mathtext_wx.py example for this. I was hoping experts in the other GUI toolkits could port this example to Gtk, Qt, Tk etc. (assuming it's doable).

math blitted into a vtk or other
canvas, webapp servers wanting to use math pngs etc...

So I'd like at a minimum to move your latex2png into the mathtext
module (or the text module or wherever it belongs), probably rename it
mathtext2png to avoid confusion, and import that function into the
mathpng sphinx extension. I also think we should provide a math2array
which returns an rgba array that people can do what they want with.
I'm happy to do all this easy stuff now that you have done the hard
part, but I just wanted to bounce it off you in case you had any
suggestions. I'm curious about a couple of things in the mathpng
func:

  * why do you hardcode the math font to be 'cm'?
  

Just so that the documentation will always look the same, even if the machine on which the documentation is being generated specifies wacky math fonts. I considered adding a parameter to the "math" directive to select the fontset, but then realized that wouldn't work for LaTeX (where *real* TeX is used to render the math). I thought it best to have reasonable consistency between the HTML and PDF versions of the docs, so opted for "cm" as the default.

  * why do you hardcode the dpi to be 120 -- is that just a stylistic
choice?

It seemed to look the best inlined in HTML on my browser with my fonts. Totally subjective choice. For people with different monitor resolutions, font sizes etc. that obviously doesn't work. But that's more a limitation of HTML (or the HTML that Sphinx currently generates) than anything else. Note also that the inline math images are not baseline-adjusted. For that, we need to get a proper baseline out of mathtext, which currently isn't possible.

  BTW, in semi-related news, it appears sphinx (at least my
version) ignores the scale on the image directives, which is why the
html images appear large and the PDF ones appear small. This is odd,
because on my system rst2html respects the scale directive so it
appears to be a buglet.
  

Could be.

Very nice work on the auto-generated symbol tables, btw.

I consider that somewhat of a work in progress. It was important (to me at least) to have them somewhat sorted into categories, rather than just a jumbled or alphabetized list, but I still think they could be ordered better, and categorized at a finer level to pick things out faster. (See the "Comprehensive LaTeX Symbol List" for a reasonable way to do this). All that just takes busy work -- the infrastructure is already there.

Another shortcoming is that the table is automatically "chunked" into 20 rows, since otherwise LaTeX will create a table that extends beyond the bottom of the page. But the chunking makes things look much less neat and is totally arbitrary. Finer-grained categories would be a good way around this.

  I am eagerly
studying this sphinxext stuff -- very powerful. You know, Stefan
called for a sphinx presentation the other day for scipy 08, and I
think this kind of stuff would make a great talk if you are planning
on attending.
  

There does seem to be a recent convergence around Sphinx in the Scipy world, and matplotlib seems to be forging ahead a little bit (maybe that's just my impression from being in the middle of matplotlib more so than other projects). It would be great to have something like a Sphinx/Documentation BoF to share our experiences thus far, or perhaps a lightning talk (which at SciPy are 10 minutes) to outline what matplotlib has done wrt documentation. If Darren were going, he'd be ideal to give that talk, but I could probably manage as well.

Cheers,
Mike

···

On Wed, Jun 11, 2008 at 12:25 PM, Michael Droettboom <mdroe@...31...> wrote:

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

There does seem to be a recent convergence around Sphinx in the Scipy

world, and matplotlib seems to be forging ahead a little bit (maybe
that's just my impression from being in the middle of matplotlib more so
than other projects). It would be great to have something like a
Sphinx/Documentation BoF to share our experiences thus far, or perhaps a
lightning talk (which at SciPy are 10 minutes) to outline what
matplotlib has done wrt documentation. If Darren were going, he'd be
ideal to give that talk, but I could probably manage as well.

A lightning talk would be fantastic. I have already urged Stefan to give
one about the numpy documentation editor
http://sd-2116.dedibox.fr/pydocweb/wiki/Front%20Page/

Maybe we could combine two talks taking half the time of a full talk,
with Stefan talking about the webapp, and someone from MPL talking about
this. It would make a great, consistent, view on the current
documentation efforts in scientific Python, and I bet people would be
interested, maybe to bring the ideas back home on their own projects.

Of course, I am speaking on a personal basis, and I can't speak for the
rest of the organizing committee, but this sounds very nice.

Cheers,

Ga�l

···

On Wed, Jun 11, 2008 at 02:01:59PM -0400, Michael Droettboom wrote:

Just a quick note that latex builds appear broken, and the error
message suggests it is a math problem, perhaps caused by the new
symbol table. First error is:

! LaTeX Error: Command \Cap already defined.
               Or name \end... illegal, see p.192 of the manual.

complete output below...

jdhunter@...606...:doc> python make.py latex
making figs
    already have dollar_ticks.png
    already have pyplot_three.png
    already have pyplot_two_subplots.png
    already have fig_x.png
    already have pyplot_annotate.png
    already have text_commands.png
    already have pyplot_simple.png
    already have pyplot_mathtext.png
    already have annotation_polar.png
    already have annotation_basic.png
    already have fig_axes_labels_simple.png
    already have text_layout.png
    already have pyplot_text.png
    already have fig_axes_customize_simple.png
    already have pyplot_formatstr.png
all figures made
Sphinx v0.3, building latex
trying to load pickled env... not found
building [latex]: all documents
updating environment: 31 added, 0 changed, 0 removed
reading... api/artist_api api/axes_api api/backend_api api/index
api/pyplot_api devel/add_new_projection devel/coding_guide
devel/documenting_mpl devel/index devel/outline devel/transformations
faq/environment_variables_faq faq/howto_faq faq/index
faq/installing_faq faq/troubleshooting_faq index users/annotations
users/arraydata users/artists users/customizing users/event_handling
users/index users/index_text users/intro users/mathtext
users/navigation_toolbar users/pyplot_tutorial users/text_intro
users/text_props users/usetex
pickling the env... done
checking consistency...
WARNING: /home/jdhunter/mpl/doc/users/arraydata.rst:: document isn't
included in any toctree
processing Matplotlib.tex... index users/index users/intro
users/pyplot_tutorial users/navigation_toolbar users/customizing
users/index_text users/text_intro users/text_props users/mathtext
users/usetex users/annotations users/artists users/event_handling
faq/index faq/installing_faq faq/troubleshooting_faq faq/howto_faq
faq/environment_variables_faq devel/index devel/coding_guide
devel/documenting_mpl devel/transformations devel/add_new_projection
devel/outline api/index api/artist_api api/axes_api api/pyplot_api
api/backend_api
resolving references...
writing... done
finishing...
copying images... _static/cm_fontset.png
users/figures/fig_axes_labels_simple.png mpl_data/images/back.png
_static/stix_fontset.png users/figures/fig_x.png
mpl_data/images/zoom_to_rect.png mpl_data/images/filesave.png
users/figures/pyplot_text.png users/figures/dollar_ticks.png
_static/transforms.png users/figures/annotation_basic.png
users/figures/annotation_polar.png users/figures/pyplot_mathtext.png
mpl_data/images/home.png _static/stixsans_fontset.png
users/figures/pyplot_formatstr.png mpl_data/images/move.png
users/figures/fig_axes_customize_simple.png
users/figures/text_layout.png mpl_data/images/subplots.png
users/figures/text_commands.png users/figures/pyplot_annotate.png
_static/tex_unicode_demo.png users/figures/pyplot_three.png
_static/tex_demo.png mpl_data/images/forward.png
users/figures/pyplot_two_subplots.png _static/toolbar.png
_static/stix_fonts.png users/figures/pyplot_simple.png
copying TeX support files...
build succeeded, 1 warning.
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
entering extended mode
(./Matplotlib.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e
stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur
kish, ukrainian, nohyphenation, loaded.
(./manual.cls
Document Class: manual 2008/05/01 Document class (Sphinx manual)
(/usr/share/texmf/tex/latex/fancybox/fancybox.sty
Style option: `fancybox' v1.3 <2000/09/19> (tvz)
) (/usr/share/texmf/tex/latex/base/report.cls
Document Class: report 2004/02/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size11.clo))
(/usr/share/texmf/tex/latex/fancyhdr/fancyhdr.sty) (./fncychap.sty)
(./sphinx.sty (/usr/share/texmf/tex/latex/base/textcomp.sty
(/usr/share/texmf/tex/latex/base/ts1enc.def))
(/usr/share/texmf/tex/latex/psnfss/times.sty)
(/usr/share/texmf/tex/latex/fancyvrb/fancyvrb.sty
Style option: `fancyvrb' v2.6, with DG/SPQR fixes <1998/07/17> (tvz)
(/usr/share/texmf/tex/latex/graphics/keyval.sty)
No file fancyvrb.cfg.
) (/usr/share/texmf/tex/latex/titlesec/titlesec.sty) (./tabulary.sty
(/usr/share/texmf/tex/latex/tools/array.sty))
(/usr/share/texmf/tex/latex/graphics/color.sty
(/usr/share/texmf/tex/latex/graphics/color.cfg)
(/usr/share/texmf/tex/latex/graphics/pdftex.def))
(/usr/share/texmf/tex/latex/hyperref/hyperref.sty
(/usr/share/texmf/tex/latex/hyperref/pd1enc.def)
(/usr/share/texmf/tex/latex/hyperref/hyperref.cfg)
Implicit mode ON; LaTeX internals redefined
(/usr/share/texmf/tex/latex/url/url.sty))
*hyperref using default driver hpdftex*
(/usr/share/texmf/tex/latex/hyperref/hpdftex.def
(/usr/share/texmf/tex/latex/psnfss/pifont.sty
(/usr/share/texmf/tex/latex/psnfss/upzd.fd)
(/usr/share/texmf/tex/latex/psnfss/upsy.fd)))
(/usr/share/texmf/tex/latex/framed/framed.sty)
(/usr/share/texmf/tex/latex/graphics/graphicx.sty
(/usr/share/texmf/tex/latex/graphics/graphics.sty
(/usr/share/texmf/tex/latex/graphics/trig.sty)
(/usr/share/texmf/tex/latex/graphics/graphics.cfg)))
(/usr/share/texmf/tex/plain/pdfcolor/pdfcolor.tex))
(/usr/share/texmf/tex/latex/base/makeidx.sty))
(/usr/share/texmf/tex/latex/base/inputenc.sty
(/usr/share/texmf/tex/latex/base/utf8.def
(/usr/share/texmf/tex/latex/base/t1enc.dfu)
(/usr/share/texmf/tex/latex/base/ot1enc.dfu)
(/usr/share/texmf/tex/latex/base/omsenc.dfu)
(/usr/share/texmf/tex/latex/base/ts1enc.dfu)))
(/usr/share/texmf/tex/latex/base/fontenc.sty
(/usr/share/texmf/tex/latex/base/t1enc.def))
(/usr/share/texmf/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texmf/tex/latex/amsmath/amstext.sty
(/usr/share/texmf/tex/latex/amsmath/amsgen.sty))
(/usr/share/texmf/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texmf/tex/latex/amsmath/amsopn.sty))
(/usr/share/texmf/tex/latex/amsfonts/amsfonts.sty)
(/usr/share/texmf/tex/latex/amsfonts/amssymb.sty)
Writing index file Matplotlib.idx

! LaTeX Error: Command \Cap already defined.
               Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.28 ...ap[1]{\textcolor[rgb]{0.78,0.36,0.04}{#1}}

···

On Wed, Jun 11, 2008 at 12:35 PM, John Hunter <jdh2358@...149...> wrote:

On Wed, Jun 11, 2008 at 12:25 PM, Michael Droettboom <mdroe@...31...> wrote:

Ok. I think I have that worked out -- would you mind testing on docutils
0.4? (I don't think I broke anything that wasn't already broken...)

OK, sorry I've been causing so much trouble, but I guess it is good
that at least one of works on python 2.4 sometimes.

I did not manage to build it either, but with another error, the output is actually huge, and ipython (how come it is called?) crashes, but after CTRL-C I get:
Original exception was:
Traceback (most recent call last):
  File "make.py", line 54, in <module>
    all()
  File "make.py", line 39, in all
    figs()
  File "make.py", line 25, in figs
    plt.savefig(outfile)
  File "/usr/lib/python2.5/site-packages/matplotlib/pyplot.py", line 278, in savefig
    return fig.savefig(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 986, in savefig
    self.canvas.print_figure(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/matplotlib/backend_bases.py", line 1286, in print_figure
    **kwargs)
  File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py", line 300, in print_png
    FigureCanvasAgg.draw(self)
  File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py", line 256, in draw
    self.figure.draw(self.renderer)
  File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 825, in draw
    for a in self.axes: a.draw(renderer)
  File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line 1502, in draw
    a.draw(renderer)
  File "/usr/lib/python2.5/site-packages/matplotlib/axis.py", line 674, in draw
    tick.draw(renderer)
  File "/usr/lib/python2.5/site-packages/matplotlib/axis.py", line 173, in draw
    self.label1.draw(renderer)
  File "/usr/lib/python2.5/site-packages/matplotlib/text.py", line 764, in draw
    Text.draw(self, renderer)
  File "/usr/lib/python2.5/site-packages/matplotlib/text.py", line 298, in draw
    bbox, info = self._get_layout(renderer)
  File "/usr/lib/python2.5/site-packages/matplotlib/text.py", line 198, in _get_layout
    line, self._fontproperties, ismath=self.is_math_text(line))
  File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py", line 128, in get_text_width_height_descent
    Z = texmanager.get_grey(s, size, self.dpi)
  File "/usr/lib/python2.5/site-packages/matplotlib/texmanager.py", line 366, in get_grey
    pngfile = self.make_png(tex, fontsize, dpi)
  File "/usr/lib/python2.5/site-packages/matplotlib/texmanager.py", line 300, in make_png
    dvifile = self.make_dvi(tex, fontsize)
  File "/usr/lib/python2.5/site-packages/matplotlib/texmanager.py", line 269, in make_dvi
    texfile = self.make_tex(tex, fontsize)
  File "/usr/lib/python2.5/site-packages/matplotlib/texmanager.py", line 248, in make_tex
    fh.write(s)

Johann

John Hunter wrote:

···

On Wed, Jun 11, 2008 at 12:35 PM, John Hunter <jdh2358@...149...> wrote:
  

On Wed, Jun 11, 2008 at 12:25 PM, Michael Droettboom <mdroe@...31...> wrote:
    

Ok. I think I have that worked out -- would you mind testing on docutils
0.4? (I don't think I broke anything that wasn't already broken...)
      

OK, sorry I've been causing so much trouble, but I guess it is good
that at least one of works on python 2.4 sometimes.
    
Just a quick note that latex builds appear broken, and the error
message suggests it is a math problem, perhaps caused by the new
symbol table. First error is:

! LaTeX Error: Command \Cap already defined.
               Or name \end... illegal, see p.192 of the manual.

complete output below...

jdhunter@...606...:doc> python make.py latex
making figs
    already have dollar_ticks.png
    already have pyplot_three.png
    already have pyplot_two_subplots.png
    already have fig_x.png
    already have pyplot_annotate.png
    already have text_commands.png
    already have pyplot_simple.png
    already have pyplot_mathtext.png
    already have annotation_polar.png
    already have annotation_basic.png
    already have fig_axes_labels_simple.png
    already have text_layout.png
    already have pyplot_text.png
    already have fig_axes_customize_simple.png
    already have pyplot_formatstr.png
all figures made
Sphinx v0.3, building latex
trying to load pickled env... not found
building [latex]: all documents
updating environment: 31 added, 0 changed, 0 removed
reading... api/artist_api api/axes_api api/backend_api api/index
api/pyplot_api devel/add_new_projection devel/coding_guide
devel/documenting_mpl devel/index devel/outline devel/transformations
faq/environment_variables_faq faq/howto_faq faq/index
faq/installing_faq faq/troubleshooting_faq index users/annotations
users/arraydata users/artists users/customizing users/event_handling
users/index users/index_text users/intro users/mathtext
users/navigation_toolbar users/pyplot_tutorial users/text_intro
users/text_props users/usetex
pickling the env... done
checking consistency...
WARNING: /home/jdhunter/mpl/doc/users/arraydata.rst:: document isn't
included in any toctree
processing Matplotlib.tex... index users/index users/intro
users/pyplot_tutorial users/navigation_toolbar users/customizing
users/index_text users/text_intro users/text_props users/mathtext
users/usetex users/annotations users/artists users/event_handling
faq/index faq/installing_faq faq/troubleshooting_faq faq/howto_faq
faq/environment_variables_faq devel/index devel/coding_guide
devel/documenting_mpl devel/transformations devel/add_new_projection
devel/outline api/index api/artist_api api/axes_api api/pyplot_api
api/backend_api
resolving references...
writing... done
finishing...
copying images... _static/cm_fontset.png
users/figures/fig_axes_labels_simple.png mpl_data/images/back.png
_static/stix_fontset.png users/figures/fig_x.png
mpl_data/images/zoom_to_rect.png mpl_data/images/filesave.png
users/figures/pyplot_text.png users/figures/dollar_ticks.png
_static/transforms.png users/figures/annotation_basic.png
users/figures/annotation_polar.png users/figures/pyplot_mathtext.png
mpl_data/images/home.png _static/stixsans_fontset.png
users/figures/pyplot_formatstr.png mpl_data/images/move.png
users/figures/fig_axes_customize_simple.png
users/figures/text_layout.png mpl_data/images/subplots.png
users/figures/text_commands.png users/figures/pyplot_annotate.png
_static/tex_unicode_demo.png users/figures/pyplot_three.png
_static/tex_demo.png mpl_data/images/forward.png
users/figures/pyplot_two_subplots.png _static/toolbar.png
_static/stix_fonts.png users/figures/pyplot_simple.png
copying TeX support files...
build succeeded, 1 warning.
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
entering extended mode
(./Matplotlib.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e
stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur
kish, ukrainian, nohyphenation, loaded.
(./manual.cls
Document Class: manual 2008/05/01 Document class (Sphinx manual)
(/usr/share/texmf/tex/latex/fancybox/fancybox.sty
Style option: `fancybox' v1.3 <2000/09/19> (tvz)
) (/usr/share/texmf/tex/latex/base/report.cls
Document Class: report 2004/02/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size11.clo))
(/usr/share/texmf/tex/latex/fancyhdr/fancyhdr.sty) (./fncychap.sty)
(./sphinx.sty (/usr/share/texmf/tex/latex/base/textcomp.sty
(/usr/share/texmf/tex/latex/base/ts1enc.def))
(/usr/share/texmf/tex/latex/psnfss/times.sty)
(/usr/share/texmf/tex/latex/fancyvrb/fancyvrb.sty
Style option: `fancyvrb' v2.6, with DG/SPQR fixes <1998/07/17> (tvz)
(/usr/share/texmf/tex/latex/graphics/keyval.sty)
No file fancyvrb.cfg.
) (/usr/share/texmf/tex/latex/titlesec/titlesec.sty) (./tabulary.sty
(/usr/share/texmf/tex/latex/tools/array.sty))
(/usr/share/texmf/tex/latex/graphics/color.sty
(/usr/share/texmf/tex/latex/graphics/color.cfg)
(/usr/share/texmf/tex/latex/graphics/pdftex.def))
(/usr/share/texmf/tex/latex/hyperref/hyperref.sty
(/usr/share/texmf/tex/latex/hyperref/pd1enc.def)
(/usr/share/texmf/tex/latex/hyperref/hyperref.cfg)
Implicit mode ON; LaTeX internals redefined
(/usr/share/texmf/tex/latex/url/url.sty))
*hyperref using default driver hpdftex*
(/usr/share/texmf/tex/latex/hyperref/hpdftex.def
(/usr/share/texmf/tex/latex/psnfss/pifont.sty
(/usr/share/texmf/tex/latex/psnfss/upzd.fd)
(/usr/share/texmf/tex/latex/psnfss/upsy.fd)))
(/usr/share/texmf/tex/latex/framed/framed.sty)
(/usr/share/texmf/tex/latex/graphics/graphicx.sty
(/usr/share/texmf/tex/latex/graphics/graphics.sty
(/usr/share/texmf/tex/latex/graphics/trig.sty)
(/usr/share/texmf/tex/latex/graphics/graphics.cfg)))
(/usr/share/texmf/tex/plain/pdfcolor/pdfcolor.tex))
(/usr/share/texmf/tex/latex/base/makeidx.sty))
(/usr/share/texmf/tex/latex/base/inputenc.sty
(/usr/share/texmf/tex/latex/base/utf8.def
(/usr/share/texmf/tex/latex/base/t1enc.dfu)
(/usr/share/texmf/tex/latex/base/ot1enc.dfu)
(/usr/share/texmf/tex/latex/base/omsenc.dfu)
(/usr/share/texmf/tex/latex/base/ts1enc.dfu)))
(/usr/share/texmf/tex/latex/base/fontenc.sty
(/usr/share/texmf/tex/latex/base/t1enc.def))
(/usr/share/texmf/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texmf/tex/latex/amsmath/amstext.sty
(/usr/share/texmf/tex/latex/amsmath/amsgen.sty))
(/usr/share/texmf/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texmf/tex/latex/amsmath/amsopn.sty))
(/usr/share/texmf/tex/latex/amsfonts/amsfonts.sty)
(/usr/share/texmf/tex/latex/amsfonts/amssymb.sty)
Writing index file Matplotlib.idx

! LaTeX Error: Command \Cap already defined.
               Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.28 ...ap[1]{\textcolor[rgb]{0.78,0.36,0.04}{#1}}

-------------------------------------------------------------------------
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
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Hmm. Isn't broken for me. I suspect we have some sort of version mismatch.

One thing to try -- in conf.py remove the line

\usepackage{amsfonts}

It actually doesn't seem to be necessary (but the other two are). This error message happens during package loading, before any of the core of our document is parsed. Is suspect its a bug in your LaTeX distribution that is causing package conflicts.

Cheers,
Mike

John Hunter wrote:

···

On Wed, Jun 11, 2008 at 12:35 PM, John Hunter <jdh2358@...149...> wrote:
  

On Wed, Jun 11, 2008 at 12:25 PM, Michael Droettboom <mdroe@...31...> wrote:
    

Ok. I think I have that worked out -- would you mind testing on docutils
0.4? (I don't think I broke anything that wasn't already broken...)
      

OK, sorry I've been causing so much trouble, but I guess it is good
that at least one of works on python 2.4 sometimes.
    
Just a quick note that latex builds appear broken, and the error
message suggests it is a math problem, perhaps caused by the new
symbol table. First error is:

! LaTeX Error: Command \Cap already defined.
               Or name \end... illegal, see p.192 of the manual.

complete output below...

jdhunter@...606...:doc> python make.py latex
making figs
    already have dollar_ticks.png
    already have pyplot_three.png
    already have pyplot_two_subplots.png
    already have fig_x.png
    already have pyplot_annotate.png
    already have text_commands.png
    already have pyplot_simple.png
    already have pyplot_mathtext.png
    already have annotation_polar.png
    already have annotation_basic.png
    already have fig_axes_labels_simple.png
    already have text_layout.png
    already have pyplot_text.png
    already have fig_axes_customize_simple.png
    already have pyplot_formatstr.png
all figures made
Sphinx v0.3, building latex
trying to load pickled env... not found
building [latex]: all documents
updating environment: 31 added, 0 changed, 0 removed
reading... api/artist_api api/axes_api api/backend_api api/index
api/pyplot_api devel/add_new_projection devel/coding_guide
devel/documenting_mpl devel/index devel/outline devel/transformations
faq/environment_variables_faq faq/howto_faq faq/index
faq/installing_faq faq/troubleshooting_faq index users/annotations
users/arraydata users/artists users/customizing users/event_handling
users/index users/index_text users/intro users/mathtext
users/navigation_toolbar users/pyplot_tutorial users/text_intro
users/text_props users/usetex
pickling the env... done
checking consistency...
WARNING: /home/jdhunter/mpl/doc/users/arraydata.rst:: document isn't
included in any toctree
processing Matplotlib.tex... index users/index users/intro
users/pyplot_tutorial users/navigation_toolbar users/customizing
users/index_text users/text_intro users/text_props users/mathtext
users/usetex users/annotations users/artists users/event_handling
faq/index faq/installing_faq faq/troubleshooting_faq faq/howto_faq
faq/environment_variables_faq devel/index devel/coding_guide
devel/documenting_mpl devel/transformations devel/add_new_projection
devel/outline api/index api/artist_api api/axes_api api/pyplot_api
api/backend_api
resolving references...
writing... done
finishing...
copying images... _static/cm_fontset.png
users/figures/fig_axes_labels_simple.png mpl_data/images/back.png
_static/stix_fontset.png users/figures/fig_x.png
mpl_data/images/zoom_to_rect.png mpl_data/images/filesave.png
users/figures/pyplot_text.png users/figures/dollar_ticks.png
_static/transforms.png users/figures/annotation_basic.png
users/figures/annotation_polar.png users/figures/pyplot_mathtext.png
mpl_data/images/home.png _static/stixsans_fontset.png
users/figures/pyplot_formatstr.png mpl_data/images/move.png
users/figures/fig_axes_customize_simple.png
users/figures/text_layout.png mpl_data/images/subplots.png
users/figures/text_commands.png users/figures/pyplot_annotate.png
_static/tex_unicode_demo.png users/figures/pyplot_three.png
_static/tex_demo.png mpl_data/images/forward.png
users/figures/pyplot_two_subplots.png _static/toolbar.png
_static/stix_fonts.png users/figures/pyplot_simple.png
copying TeX support files...
build succeeded, 1 warning.
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
entering extended mode
(./Matplotlib.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e
stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur
kish, ukrainian, nohyphenation, loaded.
(./manual.cls
Document Class: manual 2008/05/01 Document class (Sphinx manual)
(/usr/share/texmf/tex/latex/fancybox/fancybox.sty
Style option: `fancybox' v1.3 <2000/09/19> (tvz)
) (/usr/share/texmf/tex/latex/base/report.cls
Document Class: report 2004/02/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size11.clo))
(/usr/share/texmf/tex/latex/fancyhdr/fancyhdr.sty) (./fncychap.sty)
(./sphinx.sty (/usr/share/texmf/tex/latex/base/textcomp.sty
(/usr/share/texmf/tex/latex/base/ts1enc.def))
(/usr/share/texmf/tex/latex/psnfss/times.sty)
(/usr/share/texmf/tex/latex/fancyvrb/fancyvrb.sty
Style option: `fancyvrb' v2.6, with DG/SPQR fixes <1998/07/17> (tvz)
(/usr/share/texmf/tex/latex/graphics/keyval.sty)
No file fancyvrb.cfg.
) (/usr/share/texmf/tex/latex/titlesec/titlesec.sty) (./tabulary.sty
(/usr/share/texmf/tex/latex/tools/array.sty))
(/usr/share/texmf/tex/latex/graphics/color.sty
(/usr/share/texmf/tex/latex/graphics/color.cfg)
(/usr/share/texmf/tex/latex/graphics/pdftex.def))
(/usr/share/texmf/tex/latex/hyperref/hyperref.sty
(/usr/share/texmf/tex/latex/hyperref/pd1enc.def)
(/usr/share/texmf/tex/latex/hyperref/hyperref.cfg)
Implicit mode ON; LaTeX internals redefined
(/usr/share/texmf/tex/latex/url/url.sty))
*hyperref using default driver hpdftex*
(/usr/share/texmf/tex/latex/hyperref/hpdftex.def
(/usr/share/texmf/tex/latex/psnfss/pifont.sty
(/usr/share/texmf/tex/latex/psnfss/upzd.fd)
(/usr/share/texmf/tex/latex/psnfss/upsy.fd)))
(/usr/share/texmf/tex/latex/framed/framed.sty)
(/usr/share/texmf/tex/latex/graphics/graphicx.sty
(/usr/share/texmf/tex/latex/graphics/graphics.sty
(/usr/share/texmf/tex/latex/graphics/trig.sty)
(/usr/share/texmf/tex/latex/graphics/graphics.cfg)))
(/usr/share/texmf/tex/plain/pdfcolor/pdfcolor.tex))
(/usr/share/texmf/tex/latex/base/makeidx.sty))
(/usr/share/texmf/tex/latex/base/inputenc.sty
(/usr/share/texmf/tex/latex/base/utf8.def
(/usr/share/texmf/tex/latex/base/t1enc.dfu)
(/usr/share/texmf/tex/latex/base/ot1enc.dfu)
(/usr/share/texmf/tex/latex/base/omsenc.dfu)
(/usr/share/texmf/tex/latex/base/ts1enc.dfu)))
(/usr/share/texmf/tex/latex/base/fontenc.sty
(/usr/share/texmf/tex/latex/base/t1enc.def))
(/usr/share/texmf/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texmf/tex/latex/amsmath/amstext.sty
(/usr/share/texmf/tex/latex/amsmath/amsgen.sty))
(/usr/share/texmf/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texmf/tex/latex/amsmath/amsopn.sty))
(/usr/share/texmf/tex/latex/amsfonts/amsfonts.sty)
(/usr/share/texmf/tex/latex/amsfonts/amssymb.sty)
Writing index file Matplotlib.idx

! LaTeX Error: Command \Cap already defined.
               Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.28 ...ap[1]{\textcolor[rgb]{0.78,0.36,0.04}{#1}}
  
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

It looks as if the docs can't be built if text.usetex is "True", first because of needing Unicode (which also requires setting text.latex.unicode to True), and second because the dollar_ticks.py demo doesn't escape '$'.

I suppose we should hardcode text.usetex to "False" when building the documentation figures. Better yet, it might be a good idea to provide a "documentation-only" matplotlibrc (or use only the defaults) so that we can always get consistent results when building the documentation.

Cheers,
Mike

Johann Cohen-Tanugi wrote:

···

I did not manage to build it either, but with another error, the output is actually huge, and ipython (how come it is called?) crashes, but after CTRL-C I get:
Original exception was:
Traceback (most recent call last):
File "make.py", line 54, in <module>
   all()
File "make.py", line 39, in all
   figs()
File "make.py", line 25, in figs
   plt.savefig(outfile)
File "/usr/lib/python2.5/site-packages/matplotlib/pyplot.py", line 278, in savefig
   return fig.savefig(*args, **kwargs)
File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 986, in savefig
   self.canvas.print_figure(*args, **kwargs)
File "/usr/lib/python2.5/site-packages/matplotlib/backend_bases.py", line 1286, in print_figure
   **kwargs)
File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py", line 300, in print_png
   FigureCanvasAgg.draw(self)
File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py", line 256, in draw
   self.figure.draw(self.renderer)
File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 825, in draw
   for a in self.axes: a.draw(renderer)
File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line 1502, in draw
   a.draw(renderer)
File "/usr/lib/python2.5/site-packages/matplotlib/axis.py", line 674, in draw
   tick.draw(renderer)
File "/usr/lib/python2.5/site-packages/matplotlib/axis.py", line 173, in draw
   self.label1.draw(renderer)
File "/usr/lib/python2.5/site-packages/matplotlib/text.py", line 764, in draw
   Text.draw(self, renderer)
File "/usr/lib/python2.5/site-packages/matplotlib/text.py", line 298, in draw
   bbox, info = self._get_layout(renderer)
File "/usr/lib/python2.5/site-packages/matplotlib/text.py", line 198, in _get_layout
   line, self._fontproperties, ismath=self.is_math_text(line))
File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py", line 128, in get_text_width_height_descent
   Z = texmanager.get_grey(s, size, self.dpi)
File "/usr/lib/python2.5/site-packages/matplotlib/texmanager.py", line 366, in get_grey
   pngfile = self.make_png(tex, fontsize, dpi)
File "/usr/lib/python2.5/site-packages/matplotlib/texmanager.py", line 300, in make_png
   dvifile = self.make_dvi(tex, fontsize)
File "/usr/lib/python2.5/site-packages/matplotlib/texmanager.py", line 269, in make_dvi
   texfile = self.make_tex(tex, fontsize)
File "/usr/lib/python2.5/site-packages/matplotlib/texmanager.py", line 248, in make_tex
   fh.write(s)

Johann

John Hunter wrote:

On Wed, Jun 11, 2008 at 12:35 PM, John Hunter <jdh2358@...149...> wrote:

On Wed, Jun 11, 2008 at 12:25 PM, Michael Droettboom >>> <mdroe@...31...> wrote:
   

Ok. I think I have that worked out -- would you mind testing on docutils
0.4? (I don't think I broke anything that wasn't already broken...)
      

OK, sorry I've been causing so much trouble, but I guess it is good
that at least one of works on python 2.4 sometimes.
    
Just a quick note that latex builds appear broken, and the error
message suggests it is a math problem, perhaps caused by the new
symbol table. First error is:

! LaTeX Error: Command \Cap already defined.
               Or name \end... illegal, see p.192 of the manual.

complete output below...

jdhunter@...606...:doc> python make.py latex
making figs
    already have dollar_ticks.png
    already have pyplot_three.png
    already have pyplot_two_subplots.png
    already have fig_x.png
    already have pyplot_annotate.png
    already have text_commands.png
    already have pyplot_simple.png
    already have pyplot_mathtext.png
    already have annotation_polar.png
    already have annotation_basic.png
    already have fig_axes_labels_simple.png
    already have text_layout.png
    already have pyplot_text.png
    already have fig_axes_customize_simple.png
    already have pyplot_formatstr.png
all figures made
Sphinx v0.3, building latex
trying to load pickled env... not found
building [latex]: all documents
updating environment: 31 added, 0 changed, 0 removed
reading... api/artist_api api/axes_api api/backend_api api/index
api/pyplot_api devel/add_new_projection devel/coding_guide
devel/documenting_mpl devel/index devel/outline devel/transformations
faq/environment_variables_faq faq/howto_faq faq/index
faq/installing_faq faq/troubleshooting_faq index users/annotations
users/arraydata users/artists users/customizing users/event_handling
users/index users/index_text users/intro users/mathtext
users/navigation_toolbar users/pyplot_tutorial users/text_intro
users/text_props users/usetex
pickling the env... done
checking consistency...
WARNING: /home/jdhunter/mpl/doc/users/arraydata.rst:: document isn't
included in any toctree
processing Matplotlib.tex... index users/index users/intro
users/pyplot_tutorial users/navigation_toolbar users/customizing
users/index_text users/text_intro users/text_props users/mathtext
users/usetex users/annotations users/artists users/event_handling
faq/index faq/installing_faq faq/troubleshooting_faq faq/howto_faq
faq/environment_variables_faq devel/index devel/coding_guide
devel/documenting_mpl devel/transformations devel/add_new_projection
devel/outline api/index api/artist_api api/axes_api api/pyplot_api
api/backend_api
resolving references...
writing... done
finishing...
copying images... _static/cm_fontset.png
users/figures/fig_axes_labels_simple.png mpl_data/images/back.png
_static/stix_fontset.png users/figures/fig_x.png
mpl_data/images/zoom_to_rect.png mpl_data/images/filesave.png
users/figures/pyplot_text.png users/figures/dollar_ticks.png
_static/transforms.png users/figures/annotation_basic.png
users/figures/annotation_polar.png users/figures/pyplot_mathtext.png
mpl_data/images/home.png _static/stixsans_fontset.png
users/figures/pyplot_formatstr.png mpl_data/images/move.png
users/figures/fig_axes_customize_simple.png
users/figures/text_layout.png mpl_data/images/subplots.png
users/figures/text_commands.png users/figures/pyplot_annotate.png
_static/tex_unicode_demo.png users/figures/pyplot_three.png
_static/tex_demo.png mpl_data/images/forward.png
users/figures/pyplot_two_subplots.png _static/toolbar.png
_static/stix_fonts.png users/figures/pyplot_simple.png
copying TeX support files...
build succeeded, 1 warning.
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
entering extended mode
(./Matplotlib.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e
stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur
kish, ukrainian, nohyphenation, loaded.
(./manual.cls
Document Class: manual 2008/05/01 Document class (Sphinx manual)
(/usr/share/texmf/tex/latex/fancybox/fancybox.sty
Style option: `fancybox' v1.3 <2000/09/19> (tvz)
) (/usr/share/texmf/tex/latex/base/report.cls
Document Class: report 2004/02/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size11.clo))
(/usr/share/texmf/tex/latex/fancyhdr/fancyhdr.sty) (./fncychap.sty)
(./sphinx.sty (/usr/share/texmf/tex/latex/base/textcomp.sty
(/usr/share/texmf/tex/latex/base/ts1enc.def))
(/usr/share/texmf/tex/latex/psnfss/times.sty)
(/usr/share/texmf/tex/latex/fancyvrb/fancyvrb.sty
Style option: `fancyvrb' v2.6, with DG/SPQR fixes <1998/07/17> (tvz)
(/usr/share/texmf/tex/latex/graphics/keyval.sty)
No file fancyvrb.cfg.
) (/usr/share/texmf/tex/latex/titlesec/titlesec.sty) (./tabulary.sty
(/usr/share/texmf/tex/latex/tools/array.sty))
(/usr/share/texmf/tex/latex/graphics/color.sty
(/usr/share/texmf/tex/latex/graphics/color.cfg)
(/usr/share/texmf/tex/latex/graphics/pdftex.def))
(/usr/share/texmf/tex/latex/hyperref/hyperref.sty
(/usr/share/texmf/tex/latex/hyperref/pd1enc.def)
(/usr/share/texmf/tex/latex/hyperref/hyperref.cfg)
Implicit mode ON; LaTeX internals redefined
(/usr/share/texmf/tex/latex/url/url.sty))
*hyperref using default driver hpdftex*
(/usr/share/texmf/tex/latex/hyperref/hpdftex.def
(/usr/share/texmf/tex/latex/psnfss/pifont.sty
(/usr/share/texmf/tex/latex/psnfss/upzd.fd)
(/usr/share/texmf/tex/latex/psnfss/upsy.fd)))
(/usr/share/texmf/tex/latex/framed/framed.sty)
(/usr/share/texmf/tex/latex/graphics/graphicx.sty
(/usr/share/texmf/tex/latex/graphics/graphics.sty
(/usr/share/texmf/tex/latex/graphics/trig.sty)
(/usr/share/texmf/tex/latex/graphics/graphics.cfg)))
(/usr/share/texmf/tex/plain/pdfcolor/pdfcolor.tex))
(/usr/share/texmf/tex/latex/base/makeidx.sty))
(/usr/share/texmf/tex/latex/base/inputenc.sty
(/usr/share/texmf/tex/latex/base/utf8.def
(/usr/share/texmf/tex/latex/base/t1enc.dfu)
(/usr/share/texmf/tex/latex/base/ot1enc.dfu)
(/usr/share/texmf/tex/latex/base/omsenc.dfu)
(/usr/share/texmf/tex/latex/base/ts1enc.dfu)))
(/usr/share/texmf/tex/latex/base/fontenc.sty
(/usr/share/texmf/tex/latex/base/t1enc.def))
(/usr/share/texmf/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texmf/tex/latex/amsmath/amstext.sty
(/usr/share/texmf/tex/latex/amsmath/amsgen.sty))
(/usr/share/texmf/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texmf/tex/latex/amsmath/amsopn.sty))
(/usr/share/texmf/tex/latex/amsfonts/amsfonts.sty)
(/usr/share/texmf/tex/latex/amsfonts/amssymb.sty)
Writing index file Matplotlib.idx

! LaTeX Error: Command \Cap already defined.
               Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.28 ...ap[1]{\textcolor[rgb]{0.78,0.36,0.04}{#1}}

-------------------------------------------------------------------------

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
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
  
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

I think an empty matplotlibrc file is the right way to go. I added it in svn.

···

On Thursday 12 June 2008 08:08:41 am Michael Droettboom wrote:

It looks as if the docs can't be built if text.usetex is "True", first
because of needing Unicode (which also requires setting
text.latex.unicode to True), and second because the dollar_ticks.py demo
doesn't escape '$'.

I suppose we should hardcode text.usetex to "False" when building the
documentation figures. Better yet, it might be a good idea to provide a
"documentation-only" matplotlibrc (or use only the defaults) so that we
can always get consistent results when building the documentation.

No luck on commenting out amsfonts. I've seen this bug on two
platforms, solaris x86 and a recent ubuntu linux distro, so I suspect
this mispackaging may be fairly common. If I comment out *all* of the
ams* usepackages packages, I get past the duplicate Cap error I posted
but then get some undefined symbol error (eg digamma) unsurprisingly.

I've tried a few tests, and it looks like including only amssymb and
nothing else gives the duplicate cap error, but excluding it gives the
digamma and friends error even if the others are included. So it
looks like I'm stuck, since no combination of these packages works.

jdhunter@...606...:doc> uname -a
Linux bic128.bic.berkeley.edu 2.6.25.4-10.fc8 #1 SMP Thu May 22
22:58:37 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
jdhunter@...606...:doc> latex --version
pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4)
kpathsea version 3.5.4

JDH

···

On Thu, Jun 12, 2008 at 7:01 AM, Michael Droettboom <mdroe@...31...> wrote:

Hmm. Isn't broken for me. I suspect we have some sort of version mismatch.

One thing to try -- in conf.py remove the line

\usepackage{amsfonts}

It actually doesn't seem to be necessary (but the other two are). This
error message happens during package loading, before any of the core of our
document is parsed. Is suspect its a bug in your LaTeX distribution that is
causing package conflicts.

John Hunter wrote:

  

Hmm. Isn't broken for me. I suspect we have some sort of version mismatch.

One thing to try -- in conf.py remove the line

\usepackage{amsfonts}

It actually doesn't seem to be necessary (but the other two are). This
error message happens during package loading, before any of the core of our
document is parsed. Is suspect its a bug in your LaTeX distribution that is
causing package conflicts.
    
No luck on commenting out amsfonts. I've seen this bug on two
platforms, solaris x86 and a recent ubuntu linux distro, so I suspect
this mispackaging may be fairly common.

Ubuntu 8.4 works for me, but RHEL4 has unrelated errors and has never built Sphinx docs for me.

  If I comment out *all* of the
ams* usepackages packages, I get past the duplicate Cap error I posted
but then get some undefined symbol error (eg digamma) unsurprisingly.

I've tried a few tests, and it looks like including only amssymb and
nothing else gives the duplicate cap error, but excluding it gives the
digamma and friends error even if the others are included. So it
looks like I'm stuck, since no combination of these packages works.

jdhunter@...606...:doc> uname -a
Linux bic128.bic.berkeley.edu 2.6.25.4-10.fc8 #1 SMP Thu May 22
22:58:37 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
jdhunter@...606...:doc> latex --version
pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4)
kpathsea version 3.5.4

One way I've fixed these errors (manually) in the past is to change the ordering of the \usepackage{} statements. I wonder if you move the "ams" ones above everything else if that fixes things. If so hopefully we can submit a patch to sphinx to allow putting the custom preamble earlier.

Barring that, I suppose we'll have to a) drop the symbol table or b) use mathtext to generate the math for LaTeX (there's something very patricidal about that... ;). b) may be a little bit of work to do well, since we don't currently have a way to get a nice tightly-bound PDF of a math expression, and embedding PNGs will look bad.

Cheers,
Mike

···

On Thu, Jun 12, 2008 at 7:01 AM, Michael Droettboom <mdroe@...31...> wrote:

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

This message looks interesting. It suggests that combining non-Computer Modern fonts with ams* packages can be troublesome. Perhaps this has been fixed in recent LaTeX distributions, which is why it works for me.

http://osdir.com/ml/tex.latex.beamer.general/2006-01/msg00026.html

I wonder if removing the

\usepackage{times}

from sphinx.sty fixes things for you. Then we have the Computer Modern fonts, of course...

Mike

Michael Droettboom wrote:

···

John Hunter wrote:
  

On Thu, Jun 12, 2008 at 7:01 AM, Michael Droettboom <mdroe@...31...> wrote:
  

Hmm. Isn't broken for me. I suspect we have some sort of version mismatch.

One thing to try -- in conf.py remove the line

\usepackage{amsfonts}

It actually doesn't seem to be necessary (but the other two are). This
error message happens during package loading, before any of the core of our
document is parsed. Is suspect its a bug in your LaTeX distribution that is
causing package conflicts.
    

No luck on commenting out amsfonts. I've seen this bug on two
platforms, solaris x86 and a recent ubuntu linux distro, so I suspect
this mispackaging may be fairly common.
    

Ubuntu 8.4 works for me, but RHEL4 has unrelated errors and has never built Sphinx docs for me.
  

  If I comment out *all* of the
ams* usepackages packages, I get past the duplicate Cap error I posted
but then get some undefined symbol error (eg digamma) unsurprisingly.

I've tried a few tests, and it looks like including only amssymb and
nothing else gives the duplicate cap error, but excluding it gives the
digamma and friends error even if the others are included. So it
looks like I'm stuck, since no combination of these packages works.

jdhunter@...606...:doc> uname -a
Linux bic128.bic.berkeley.edu 2.6.25.4-10.fc8 #1 SMP Thu May 22
22:58:37 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
jdhunter@...606...:doc> latex --version
pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4)
kpathsea version 3.5.4

One way I've fixed these errors (manually) in the past is to change the ordering of the \usepackage{} statements. I wonder if you move the "ams" ones above everything else if that fixes things. If so hopefully we can submit a patch to sphinx to allow putting the custom preamble earlier.

Barring that, I suppose we'll have to a) drop the symbol table or b) use mathtext to generate the math for LaTeX (there's something very patricidal about that... ;). b) may be a little bit of work to do well, since we don't currently have a way to get a nice tightly-bound PDF of a math expression, and embedding PNGs will look bad.

Cheers,
Mike

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA