PSTEX
Section: User Commands (1)
Updated: 8 September 1988
Index
Return to Main Contents
NAME
pstex - convert LaTeX figures.
SYNOPSIS
pstex
[ options ] file[.tex]
DESCRIPTION
Pstex
is a BiBTeX-like processor for including figures into LaTeX documents.
Figures are included using the ``\psbox'' macro;
this macro causes LaTeX to make entries in the ``.aux'' file(s) for the job.
Pstex
finds these entries, locates the corresponding PostScript files
(which should be in EPSF format as appropriate for
dvips),
and determines how to size the figure according to the
options specified in the macro in the LaTeX, and
according to the nominal size and shape of the PostScript.
It creates a ``.psz'' file containing entries indicating
the sizes which it has determined to be appropriate for each figure.
When LaTeX starts up on subsequent passes, this ``.psz'' file is
read, and LaTeX is then able to leave the correct amount of space
for each figure as it encounters them in the text.
The ``postscript'' macro file must be included in the list
of options in the documentstyle command.
This defines the necessary macros.
The primitive which is used by pstex is
``\postscriptbox{width}{height}{file}''.
This causes the postscript of file.ps to be included into the document
so that its bounding box exactly fills the width and height specified.
This creates a box, which is just like a character,
and can be placed anywhere in the document.
Typically it is included within a figure environment and a center environment,
and is associated with a caption.
The higher level macro which is provided by pstex
is ``\psbox[options]{file}''.
If the options string is omitted completely,
the figure is included at its natural, or design size,
as specified in the bounding box data of the PostScript.
Combinations of four options can be specified, separated by commas:
width=<width>,
height=<height>,
aspect=<aspect>, and
scale=<scale>
The keyword can be abbreviated, and spaces are allowed.
The width and height options can be any valid TeX or LaTeX which expands
into a dimension when placed as the argument to a
setlength macro.
For example, width=\columnwidth is a common specification.
The aspect ratio and scale parameters must be floating point constants,
or must expand to such at the time the macro is first invoked,
for example scale=0.7.
If one of width or height is specified,
the figure is scaled to that size, keeping its natural aspect ratio,
unless that is overridden by the aspect parameter.
If both of width and height are specified, the figure is made
to fit the specification exactly, if necessary changing its aspect ratio.
In this mode, the aspect ratio parameter is ignored.
In any mode, the scale parameter multiplies all of the dimensions.
This is especially useful to include a figure at some fixed fraction
of its natural size, specifying only a scale factor in the options.
Note that the dimensions can be TeX rubber dimensions
so as to fit into the page layout in the best possible manner,
if desired.
EXAMPLES
(Note that the slash characters below represent backslashes,
which are hard to include in troff text!)
- /psbox{file}
-
Include file.ps at natural size.
- /psbox[s=0.7]{file}
-
Include the document at natural size scaled down to 70%.
- /psbox[w=/columnwidth, scale=/mydocscale]{file}
-
Stretch the figure to the width of the column,
but scale it down to /mydocscale (which might be defined as 0.9 for example).
OPTIONS
- -z psdirs
-
Specify different area for postscript files to be included.
Psdirs will be searched for all
postscript files, instead of the path specified in the environment variable.
ENVIRONMENT
- DVIPSPATH
-
A list of colon-separated directories where PostScript files may be found for
insertion. It defaults to ``:/usr/spar/font/ps'' which means that the
current directory will be searched first and then the default directory.
FILES
- postscript.sty
-
Macro file defining the macros for LaTeX.
- jobname.aux
-
contains pointers to pstex.
- file.ps
-
EPSF PostScript picture files.
- file.psz
-
File generated by pstex and read in by LaTeX to afford
communication.
SEE ALSO
dvips(1), tex(1).
BUGS
LaTeX forces a cumbersome interface on its preprocessors,
such as BiBTeX and pstex.
After adding a new figure, or changing the specification in the LaTeX,
you need to run LaTeX, then psbox, then LaTeX again
to see the update results.
After a change to the PostScript, only the final LaTeX step is required.
It is very hard to get troff to put in backslashes in the documentation
in all the right places. Some are missing, others are replaced by slashes.
AUTHOR
Pstex was written by Neil Hunt at Schlumberger Palo Alto Research,
now at Teleos Research:
Neil%Teleos.com@ai.sri.com
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- EXAMPLES
-
- OPTIONS
-
- ENVIRONMENT
-
- FILES
-
- SEE ALSO
-
- BUGS
-
- AUTHOR
-
This document was created by
man2html,
using the manual pages.
Time: 01:45:52 GMT, February 01, 2023