summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 50bf9fb)
raw | patch | inline | side by side (parent: 50bf9fb)
author | ozmikepittman <ozmikepittman@users.sourceforge.net> | |
Sun, 27 Apr 2008 14:58:22 +0000 (14:58 +0000) | ||
committer | ozmikepittman <ozmikepittman@users.sourceforge.net> | |
Sun, 27 Apr 2008 14:58:22 +0000 (14:58 +0000) |
share/extensions/eqtexsvg.py | patch | blob | history |
index f5e06efe8b7e38456c4f68eca4ddb4fa1a09f2f9..3dd09c28c74b953caf74f7343d07081fa825da5c 100644 (file)
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:
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):