Next: The Emacs interface, Previous: For advanced users, Up: For advanced users
The main purpose of this package is the extraction of certain environments (most notably displayed formulas) for use in different contexts. While the erstwhile application has been the embedding of those preview fragments into Emacs source buffers under the AUCTeX editing environment, other applications are easily imaginable.
In particular it should be noted that producing EPS files with Dvips
and its derivatives using the -E option is not currently
well-supported by LaTeX. People make do by fiddling around with
\thispagestyle{empty}
and hoping for the best (namely, that the
specified contents will indeed fit on single pages), and then trying
to guess the baseline of the resulting code and stuff, but this is
at best dissatisfactory. The preview package provides an easy way
to ensure that exactly one page per request gets shipped, with a
well-defined baseline and no page decorations. Thus you can safely
use
dvips -E -i
and get a single EPS file with shrink-wrapped bounding box for every generated image of a LaTeX run.
If your ultimate goal is to produce a set of files in a different
format that can be produced by GhostScript, take a look at the
tightpage
option of the preview package. This will embed the page
dimensions into the PostScript code, obliterating the need to use
the -E -i
options to Dvips. You can then produce all image files
with a single run of GhostScript from a single PostScript file for
all images at once. The tightpage
option requires setting the
dvips
option as well.
Various options exist that will pass TeX dimensions and other information about the respective shipped out material (including descender size) into the log file, where external applications might make use of it.
The possibility for generating a whole set of graphics with a single run of LaTeX, Dvips, and GhostScript increases both speed and robustness of applications. It is to be hoped that applications like LaTeX2HTML will be able to make use of this package in future.