# Read the file COPYING
#
# \author Angus Leeming, leeming@lyx.org
-# with much help from David Kastrup, david.kastrup@t-online.de.
+# with much advice from David Kastrup, david.kastrup@t-online.de.
#
# This script takes a LaTeX file and generates PPM files, one per page.
# The idea is to use it with preview.sty from the preview-latex project
# preview.sty can be obtained from CTAN/macros/latex/contrib/supported/preview.
-# This script, lyxpreview2ppm.sh, takes three arguments:
-# FILE: the name of the file to be converted.
+# This script takes three arguments:
+# TEXFILE: the name of the .tex file to be converted.
# SCALEFACTOR: scale factor, used to ascertain the resolution of the
-# generated imagewhich is then passed to gs.
+# generated image which is then passed to gs.
# NDIGITS: the number of digits in the filenames generated by gs,
-# ${BASE}%${NDIGITS}d.ppm
+# ${BASE}%0${NDIGITS}d.ppm.
-# If successful it will leave in dir ${DIR} a number of image files
-# ${BASE}[0-9]\{${NDIGITS}\}.ppm and a file ${BASE}.metrics containing info
-# needed by LyX to position the images correctly on the screen.
+# If successful, this script will leave in dir ${DIR}:
+# ${BASE}[0-9]\{${NDIGITS}\}.ppm: a (possibly large) number of image files.
+# ${BASE}.metrics: a file containing info needed by LyX to
+# position the images correctly on the screen.
# All other files ${BASE}* will be deleted.
# Three helper functions.
grep 'Package: preview' ${LOGFILE}
}
-# Preliminary check
+# Preliminary check.
if [ $# -ne 3 ]; then
exit 1
fi