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()
bg_color = argv[5]
# External programs used by the script.
- path = string.split(os.getenv("PATH"), os.pathsep)
+ path = string.split(os.environ["PATH"], os.pathsep)
latex = find_exe_or_terminate(["pplatex", "latex2e", "latex"], path)
dvips = find_exe_or_terminate(["dvips"], path)
- gs = find_exe_or_terminate(["gswin32", "gs"], path)
+ gs = find_exe_or_terminate(["gswin32c", "gs"], path)
pnmcrop = find_exe(["pnmcrop"], path)
# Move color information into the latex file.
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"' \