Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 88ce2ec

Browse files
committed
Addressed bug #1238412 in texmanager.py
svn path=/trunk/matplotlib/; revision=1548
1 parent 10ac89a commit 88ce2ec

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
New entries should be added at the top
22

3+
2005-07-14 Fixed a Windows related bug (#1238412) in texmanager - DSD
4+
35
2005-07-11 Fixed color kwarg bug, setting color=1 or 0 caused an
46
exception - DSD
57

lib/matplotlib/texmanager.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def get_tex_command(self, tex, fname):
8888
""" % (rcParams['font.latex.package'], tex)
8989
fh.write(s)
9090
fh.close()
91-
command = "latex -interaction=nonstopmode '%s'"%fname
91+
command = 'latex -interaction=nonstopmode "%s"'%fname
9292
else:
9393
s = r"""\def\frac#1#2{ {#1 \over #2} }
9494
\nopagenumbers
@@ -99,7 +99,7 @@ def get_tex_command(self, tex, fname):
9999
""" % tex
100100
fh.write(s)
101101
fh.close()
102-
command = 'tex %s'%fname
102+
command = 'tex "%s"'%fname
103103
return command
104104

105105
def make_dvi(self, tex, force=0):
@@ -134,7 +134,7 @@ def make_png(self, tex, dpi, force=0):
134134
pngfile = os.path.join(self.texcache, '%s_%d.png'% (prefix, dpi))
135135

136136
#print 'makepng', prefix, dvifile, pngfile
137-
command = "dvipng -bg Transparent -fg 'rgb 0.0 0.0 0.0' -D %d -T tight -o %s %s"% (dpi, pngfile, dvifile)
137+
command = 'dvipng -bg Transparent -fg "rgb 0.0 0.0 0.0" -D %d -T tight -o "%s" "%s"'% (dpi, pngfile, dvifile)
138138

139139
#assume white bg
140140
#command = "dvipng -bg 'rgb 1.0 1.0 1.0' -fg 'rgb 0.0 0.0 0.0' -D %d -T tight -o %s %s"% (dpi, pngfile, dvifile)
@@ -157,7 +157,7 @@ def make_ps(self, tex, dpi, force=0):
157157
psfile = os.path.join(self.texcache, '%s_%d.epsf'% (prefix, dpi))
158158

159159
if not os.path.exists(psfile):
160-
command = "dvips -q -E -D %d -o %s %s"% (dpi, psfile, dvifile)
160+
command = 'dvips -q -E -D %d -o "%s" "%s"'% (dpi, psfile, dvifile)
161161
stdin, stdout, stderr = os.popen3(command)
162162
verbose.report(''.join(stdout.readlines()), 'debug-annoying')
163163
err = ''.join(stderr.readlines())

0 commit comments

Comments
 (0)