#! /usr/bin/env python
-# -*- coding: iso-8859-1 -*-
+# -*- coding: utf-8 -*-
# file legacy_lyxpreview2ppm.py
# This file is part of LyX, the document processor.
# with much advice from members of the preview-latex project:
# David Kastrup, dak@gnu.org and
-# Jan-Åke Larsson, jalar@mai.liu.se.
+# Jan-Åke Larsson, jalar@mai.liu.se.
# and with much help testing the code under Windows from
# Paul A. Rubin, rubin@msu.edu.
descent = string.atoi(match.group(3))
frac = 0.5
- if ascent > 0 and descent > 0:
+ if ascent >= 0 and descent >= 0:
ascent = float(ascent) + tp_ascent
descent = float(descent) - tp_descent
# External programs used by the script.
path = string.split(os.environ["PATH"], os.pathsep)
- latex = find_exe_or_terminate(["pplatex", "latex2e", "latex"], path)
+ latex = find_exe_or_terminate(["pplatex", "platex", "latex2e", "latex"], path)
dvips = find_exe_or_terminate(["dvips"], path)
gs = find_exe_or_terminate(["gswin32c", "gs"], path)
pnmcrop = find_exe(["pnmcrop"], path)