\specials
''
such as those produced using the PStricks macros. In order to use
PostScript effectively, three elements are required:
.dvi
files to PostScript,
This short note is intended to help users configure these three elements for optimal performance.
DVI
to PostScript.dvi
files to PostScript
are available. One widely used example is Tom Rokicki's
dvips
, which is free, reliable, and supports a wide range of
host systems. Commercial products are often integrated with a dvi file
viewer and may offer enhancements such as partial font downloading. The
following discussion is based on dvips
. The same approach
can, however, be applied to configuring other programs.
.pk
bitmapped
fonts generated by rendering metafont sources directly. In recent years,
processor speeds have increased to the point where excellent performance
for viewing documents can be obtained while rendering fonts as required.
PostScript supports two main types of fonts:
Dvips
can use the .pk
bitmap fonts generated
using metafont, but since PostScript viewers do not make direct use of
.pk
fonts, either a) each PostScript file must include the
fonts or b) the TeX bitmapped fonts must be converted to Type 3 fonts. By
using fonts that can be loaded as required by the viewer (i.e.,
Adobe Type 1 outline fonts) the size of the PostScript files can be
greatly reduced. Adobe Type 1 versions of the Computer Modern fonts are
available from CTAN archive sites. The lmodern and cm-super
fonts are compatible with the Computer Modern math fonts and
offer support for additional languages.
In most cases these fonts produce printed output
that is not visibly different from output produced using bitmapped
.pk
fonts.
The commercial Y and Y
Lucida fonts provide a complete set of mathematical glyphs and
are especially good for PDF documents that may be viewed at screen
resolutions.
The next release of Aladdin ghostscript will include a limited capability
for creating .pdf
documents suitable for viewing with
Adobe's Acrobat reader tools. Using a beta-test version of Aladdin
ghostscript, I have found that acrobat reader can be a very effective
viewer for TeX documents, particularly those which have many PostScript
figures.
A number of .dvi
file viewers support a mechanism to include
a rendering of a PostScript figure in a display produced directly from a
.dvi
file. This rendering may be embedded in the figure,
stored in a separate file, or generated at run-time using a PostScript
interpreter.
For typical TeX article, the size of the document is a small fraction (10--100k) of the combined size (1--2M) of the associated Type 1 font files. For such documents, it is important to minimize unnecessary copying of the fonts, both to reduce processing time and to conserve disk space (which may, for example, allow a large document to be saved on a single floppy disk).
dvips
, the Bakoma fonts, and Aladdin Ghostscript
dvips
, the font map may associate the name of a font with a
disk file, in which case the file will be embedded in a PostScript file
that uses the font. Fonts that are provided by the PostScript interpreter
are called ``printer-resident''. In the case of ghostscript, the font map
file must indicate a location for every font that will be displayed. In order to obtain good performance when using Ghostview/ghostscript to view or print TeX documents, it is helpful to configure Ghostscript to load type 1 versions of the TeX fonts directly. The original Bakoma font distribution includes a suitable FontMap fragment. This allows the PostScript file to be created without fonts, greatly reducing the size of the resulting PostScript file.
Configuration is not difficult, but requires coordination of the
configuration files for dvips
and ghostscript.
dvips
will require a configuration for ghostview and a
configuration for printing (perhaps using ghostscript as a print filter
to permit printing postscript documents on non-postscript printers). One
configuration should be chosen as the default and the necessary changes
made to the config.ps
file. The other configuration is
selected using the -P
option on the dvips
commmand line. For example, to invoke the ghostview configuration by
specifying ``-P gv
'', the file ``gv.cfg
'' would
contain:
* Ghostview configuration for .dvi
ps
*
* specify font map for ghostview
p gv.map
* output to file
o
* resolution (affects rules and .pk fonts)
D 144
If ghostscript is used for printing, the same map files can be used for
both viewing and printing; the only differences between the
dvips
configuration files would be the output line and the
resolution. In summary, the following files must be provided for each configuration:
dvips
configuration (printer.cfg
);
dvips
font map; and
FontMap
).
dvips
and ghostscript. Map file templates suitable for
editing to use with dvips
(cmfonts.map
) and
ghostscript (FontMap
fragment) are in cluded with the Bakoma
fonts in the ``etc
'' subdirectory.
ps2ai.ps
'' by Jason Olszewski
(olszewsk@splash.princeton.edu) can be used to convert most PostScript
files to editable Adobe Illustrator format. An ``aimaker
''
shell script to automate the use of ps2ai.ps
and updated
versions are available (anonymous ftp).
Adobe Illustrator files can be edited using many commercial drawing
packages, but the TeX fonts often cause problems. For example, TeX
encodes the math minus sign in the ASCII NUL position. Many drawing
programs use ASCII NUL to mark the end of a character string. A
.dvi
file created using TeX typically consists of many short
strings. If the default encoding is used with ``ps2ai.ps
'',
programs which treat NUL as the string delimiter will drop the minus signs
as well as any characters after the minus in the string. To avoid such
problems, modified versions of
``aimaker
'' and ``ps2ai.ps
'' which replace
fonts by outline paths are available. In general, this method is suitable
for creating slides and annotations for color images, but does not achieve
the print quality obtainable using normal text fonts.