@@ -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