SF.net SVN: matplotlib:[7033] branches/v0_98_5_maint

2009-04-06 Thread jouni
Revision: 7033
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7033&view=rev
Author:   jouni
Date: 2009-04-06 17:03:09 + (Mon, 06 Apr 2009)

Log Message:
---
texmanager.make_dvi now raises an error if LaTeX failed to create an output file

Modified Paths:
--
branches/v0_98_5_maint/CHANGELOG
branches/v0_98_5_maint/lib/matplotlib/texmanager.py

Modified: branches/v0_98_5_maint/CHANGELOG
===
--- branches/v0_98_5_maint/CHANGELOG2009-04-06 01:52:45 UTC (rev 7032)
+++ branches/v0_98_5_maint/CHANGELOG2009-04-06 17:03:09 UTC (rev 7033)
@@ -1,3 +1,7 @@
+2009-04-06 texmanager.make_dvi now raises an error if LaTeX failed to
+   create an output file. Thanks to Joao Luis Silva for reporting
+   this. - JKS
+
 2009-04-05 _png.read_png() reads 12 bit PNGs (patch from 
Tobias Wood) - ADS
 

Modified: branches/v0_98_5_maint/lib/matplotlib/texmanager.py
===
--- branches/v0_98_5_maint/lib/matplotlib/texmanager.py 2009-04-06 01:52:45 UTC 
(rev 7032)
+++ branches/v0_98_5_maint/lib/matplotlib/texmanager.py 2009-04-06 17:03:09 UTC 
(rev 7033)
@@ -285,7 +285,12 @@
 fh.close()
 except IOError:
 report = 'No latex error report available.'
-if exit_status:
+try:
+os.stat(dvifile)
+exists = True
+except OSError:
+exists = False
+if exit_status or not exists:
 raise RuntimeError(('LaTeX was not able to process the 
following \
 string:\n%s\nHere is the full report generated by LaTeX: \n\n'% repr(tex)) + 
report)
 else: mpl.verbose.report(report, 'debug')


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[7034] trunk/matplotlib

2009-04-06 Thread jouni
Revision: 7034
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7034&view=rev
Author:   jouni
Date: 2009-04-06 17:12:37 + (Mon, 06 Apr 2009)

Log Message:
---
Merged revisions 7033 via svnmerge from 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint


  r7033 | jouni | 2009-04-06 20:03:09 +0300 (Mon, 06 Apr 2009) | 1 line
  
  texmanager.make_dvi now raises an error if LaTeX failed to create an output 
file


Modified Paths:
--
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/texmanager.py

Property Changed:

trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py


Property changes on: trunk/matplotlib
___
Modified: svnmerge-integrated
   - /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7025,7027-7031
   + /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7033
Modified: svn:mergeinfo
   - /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025
   + /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033

Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG  2009-04-06 17:03:09 UTC (rev 7033)
+++ trunk/matplotlib/CHANGELOG  2009-04-06 17:12:37 UTC (rev 7034)
@@ -1,3 +1,7 @@
+2009-04-06 texmanager.make_dvi now raises an error if LaTeX failed to
+   create an output file. Thanks to Joao Luis Silva for reporting
+   this. - JKS
+
 2009-04-05 _png.read_png() reads 12 bit PNGs (patch from 
Tobias Wood) - ADS
 


Property changes on: trunk/matplotlib/doc/pyplots/README
___
Modified: svn:mergeinfo
   - 
/branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025
   + 
/branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033


Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___
Modified: svn:mergeinfo
   - /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025
   + /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033


Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___
Modified: svn:mergeinfo
   - /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,

SF.net SVN: matplotlib:[7035] branches/v0_98_5_maint

2009-04-06 Thread jouni
Revision: 7035
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7035&view=rev
Author:   jouni
Date: 2009-04-06 18:59:47 + (Mon, 06 Apr 2009)

Log Message:
---
The pdf backend now escapes newlines and linefeeds in strings - fixes #2708559

Modified Paths:
--
branches/v0_98_5_maint/CHANGELOG
branches/v0_98_5_maint/examples/pylab_examples/usetex_demo.py
branches/v0_98_5_maint/lib/matplotlib/backends/backend_pdf.py

Modified: branches/v0_98_5_maint/CHANGELOG
===
--- branches/v0_98_5_maint/CHANGELOG2009-04-06 17:12:37 UTC (rev 7034)
+++ branches/v0_98_5_maint/CHANGELOG2009-04-06 18:59:47 UTC (rev 7035)
@@ -1,3 +1,6 @@
+2009-04-06 The pdf backend now escapes newlines and linefeeds in strings.
+   Fixes sf bug #2708559; thanks to Tiago Pereira for the report.
+
 2009-04-06 texmanager.make_dvi now raises an error if LaTeX failed to
create an output file. Thanks to Joao Luis Silva for reporting
this. - JKS

Modified: branches/v0_98_5_maint/examples/pylab_examples/usetex_demo.py
===
--- branches/v0_98_5_maint/examples/pylab_examples/usetex_demo.py   
2009-04-06 17:12:37 UTC (rev 7034)
+++ branches/v0_98_5_maint/examples/pylab_examples/usetex_demo.py   
2009-04-06 18:59:47 UTC (rev 7035)
@@ -56,4 +56,8 @@
 ## phase field equations
 pylab.text(0.2, 0.15, r'$\mathcal{F} = \int f\left( \phi, c \right) dV,$ 
\newline $ \frac{ \partial \phi } { \partial t } = -M_{ \phi } \frac{ \delta 
\mathcal{F} } { \delta \phi }$', {'color' : 'b', 'fontsize' : 20})
 
+## these went wrong in pdf in a previous version
+pylab.text(-.9,.42,r'gamma: $\gamma$', {'color': 'r', 'fontsize': 20})
+pylab.text(-.9,.36,r'Omega: $\Omega$', {'color': 'b', 'fontsize': 20})
+
 pylab.show()

Modified: branches/v0_98_5_maint/lib/matplotlib/backends/backend_pdf.py
===
--- branches/v0_98_5_maint/lib/matplotlib/backends/backend_pdf.py   
2009-04-06 17:12:37 UTC (rev 7034)
+++ branches/v0_98_5_maint/lib/matplotlib/backends/backend_pdf.py   
2009-04-06 18:59:47 UTC (rev 7035)
@@ -112,7 +112,20 @@
 result.append(' '.join(strings[lasti:]))
 return '\n'.join(result)
 
-_string_escape_regex = re.compile(r'([\\()])')
+# PDF strings are supposed to be able to include any eight-bit data,
+# except that unbalanced parens and backslashes must be escaped by a
+# backslash. However, sf bug #2708559 shows that the carriage return
+# character may get read as a newline; these characters correspond to
+# \gamma and \Omega in TeX's math font encoding. Escaping them fixes
+# the bug.
+_string_escape_regex = re.compile(r'([\\()\r\n])')
+def _string_escape(match):
+m = match.group(0)
+if m in r'\()': return '\\' + m
+elif m == '\n': return r'\n'
+elif m == '\r': return r'\r'
+assert False
+
 def pdfRepr(obj):
 """Map Python objects to PDF syntax."""
 
@@ -138,7 +151,7 @@
 # simpler to escape them all. TODO: cut long strings into lines;
 # I believe there is some maximum line length in PDF.
 elif is_string_like(obj):
-return '(' + _string_escape_regex.sub(r'\\\1', obj) + ')'
+return '(' + _string_escape_regex.sub(_string_escape, obj) + ')'
 
 # Dictionaries. The keys must be PDF names, so if we find strings
 # there, we make Name objects from them. The values may be


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[7036] trunk/matplotlib

2009-04-06 Thread jouni
Revision: 7036
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7036&view=rev
Author:   jouni
Date: 2009-04-06 19:05:57 + (Mon, 06 Apr 2009)

Log Message:
---
Merged revisions 7035 via svnmerge from 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint


  r7035 | jouni | 2009-04-06 21:59:47 +0300 (Mon, 06 Apr 2009) | 1 line
  
  The pdf backend now escapes newlines and linefeeds in strings - fixes #2708559


Modified Paths:
--
trunk/matplotlib/CHANGELOG
trunk/matplotlib/examples/pylab_examples/usetex_demo.py
trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py

Property Changed:

trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py


Property changes on: trunk/matplotlib
___
Modified: svnmerge-integrated
   - /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7033
   + /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7035
Modified: svn:mergeinfo
   - /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033
   + /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035

Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG  2009-04-06 18:59:47 UTC (rev 7035)
+++ trunk/matplotlib/CHANGELOG  2009-04-06 19:05:57 UTC (rev 7036)
@@ -1,3 +1,6 @@
+2009-04-06 The pdf backend now escapes newlines and linefeeds in strings.
+   Fixes sf bug #2708559; thanks to Tiago Pereira for the report.
+
 2009-04-06 texmanager.make_dvi now raises an error if LaTeX failed to
create an output file. Thanks to Joao Luis Silva for reporting
this. - JKS


Property changes on: trunk/matplotlib/doc/pyplots/README
___
Modified: svn:mergeinfo
   - 
/branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033
   + 
/branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035


Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___
Modified: svn:mergeinfo
   - /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033
   + /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035


Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___
Modified: svn:mergeinfo
   - /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-