+2005-05-08 Angus Leeming <leeming@lyx.org>
+
+ * scripts/lyxpreview2bitmap.py:
+ * scripts/legacy_lyxpreview2ppm.py do not quote the name of the
+ executable when spawning an external process.
+
2005-05-07 Michael Schmitt <michael.schmitt@teststep.org>
* ui/*.ui: Synchronize menu entries with dialog titles:
def crop_files(pnmcrop, basename):
t = pipes.Template()
- t.append('"%s" -left' % pnmcrop, '--')
- t.append('"%s" -right' % pnmcrop, '--')
+ t.append('%s -left' % pnmcrop, '--')
+ t.append('%s -right' % pnmcrop, '--')
for file in glob.glob("%s*.ppm" % basename):
tmp = mkstemp()
error("Unable to move color info into the latex file")
# Compile the latex file.
- latex_call = '"%s" "%s"' % (latex, latex_file)
+ latex_call = '%s "%s"' % (latex, latex_file)
latex_status, latex_stdout = run_command(latex_call)
if latex_status != None:
dvi_file = latex_file_re.sub(".dvi", latex_file)
ps_file = latex_file_re.sub(".ps", latex_file)
- dvips_call = '"%s" -o "%s" "%s"' % (dvips, ps_file, dvi_file)
+ dvips_call = '%s -o "%s" "%s"' % (dvips, ps_file, dvi_file)
dvips_status, dvips_stdout = run_command(dvips_call)
if dvips_status != None:
alpha = 2
# Generate the bitmap images
- gs_call = '"%s" -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pnmraw ' \
+ gs_call = '%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pnmraw ' \
'-sOutputFile="%s%%d.ppm" ' \
'-dGraphicsAlphaBit=%d -dTextAlphaBits=%d ' \
'-r%f "%s"' \
for png_file in glob.glob("%s*.png" % basename):
ppm_file = png_file_re.sub(".ppm", png_file)
- p2p_cmd = "'%s' '%s'" % (pngtopnm, png_file)
+ p2p_cmd = '%s "%s"' % (pngtopnm, png_file)
p2p_status, p2p_stdout = run_command(p2p_cmd)
if p2p_status != None:
error("Unable to convert %s to ppm format" % png_file)
pngtopnm = find_exe_or_terminate(["pngtopnm"], path)
# Compile the latex file.
- latex_call = "'%s' '%s'" % (latex, latex_file)
+ latex_call = '%s "%s"' % (latex, latex_file)
latex_status, latex_stdout = run_command(latex_call)
if latex_status != None:
# Run the dvi file through dvipng.
dvi_file = latex_file_re.sub(".dvi", latex_file)
- dvipng_call = "'%s' -Ttight -depth -height -D %d -fg '%s' -bg '%s' '%s'" \
+ dvipng_call = '%s -Ttight -depth -height -D %d -fg "%s" -bg "%s" "%s"' \
% (dvipng, dpi, fg_color, bg_color, dvi_file)
dvipng_status, dvipng_stdout = run_command(dvipng_call)