summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Pittman <thepittos@yahoo.com.au>2008-04-27 14:58:22 +0000
committerozmikepittman <ozmikepittman@users.sourceforge.net>2008-04-27 14:58:22 +0000
commit0d5eee5870fb4f7201d6bf442eaf8d2952236be8 (patch)
treed2ab04ac48da5a3c989ba4dfc070b51f79aebd5c
parentReduce undo history items when nothing is selected (diff)
downloadinkscape-0d5eee5870fb4f7201d6bf442eaf8d2952236be8.tar.gz
inkscape-0d5eee5870fb4f7201d6bf442eaf8d2952236be8.zip
Applying revised Latex fix for LP #55273 - adds quotes for Win32
(bzr r5530)
-rw-r--r--share/extensions/eqtexsvg.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/share/extensions/eqtexsvg.py b/share/extensions/eqtexsvg.py
index f5e06efe8..3dd09c28c 100644
--- a/share/extensions/eqtexsvg.py
+++ b/share/extensions/eqtexsvg.py
@@ -103,8 +103,8 @@ class EQTEXSVG(inkex.Effect):
os.rmdir(base_dir)
create_equation_tex(latex_file, self.options.formula)
- #os.system('cd ' + base_dir)
- os.system('latex -output-directory=' + base_dir + ' -halt-on-error ' + latex_file + ' > ' + out_file)
+ os.system('latex "-output-directory=%s" -halt-on-error "%s" > "%s"' \
+ % (base_dir, latex_file, out_file))
try:
os.stat(dvi_file)
except OSError:
@@ -113,11 +113,14 @@ class EQTEXSVG(inkex.Effect):
print >>sys.stderr, "temporary files were left in:", base_dir
sys.exit(1)
- os.system('dvips -q -f -E -D 600 -y 5000 -o ' + ps_file + ' ' + dvi_file)
- # cd to base_dir is necessary, because pstoedit
- # writes temporary files to cwd and needs write
- # permissions
- os.system('cd ' + base_dir + ' ; pstoedit -f plot-svg -dt -ssp ' + ps_file + ' ' + svg_file + ' > ' + out_file + ' 2> ' + err_file)
+ os.system('dvips -q -f -E -D 600 -y 5000 -o "%s" "%s"' % (ps_file, dvi_file))
+ # cd to base_dir is necessary, because pstoedit writes
+ # temporary files to cwd and needs write permissions
+ separator = ';'
+ if os.name == 'nt':
+ separator = '&&'
+ os.system('cd "%s" %s pstoedit -f plot-svg -dt -ssp "%s" "%s" > "%s" 2> "%s"' \
+ % (base_dir, separator, ps_file, svg_file, out_file, err_file))
# forward errors to stderr but skip pstoedit header
if os.path.exists(err_file):