1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
8 September 1988 PSTEX(1)
NAME
pstex - convert LaTeX figures.
SYNOPSIS
pstex [ options ] file[.tex]
DESCRIPTION
_P_s_t_e_x 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. _P_s_t_e_x finds these entries,
locates the corresponding PostScript files (which should be
in EPSF format as appropriate for _d_v_i_p_s), 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 con-
taining 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 fig-
ure 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 _p_s_t_e_x 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 charac-
ter, 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 _p_s_t_e_x 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: _w_i_d_t_h=<_w_i_d_t_h>, _h_e_i_g_h_t=<_h_e_i_g_h_t>, _a_s_p_e_c_t=<_a_s_p_e_c_t>, and
_s_c_a_l_e=<_s_c_a_l_e> 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,
_w_i_d_t_h=\_c_o_l_u_m_n_w_i_d_t_h 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 _s_c_a_l_e=_0._7.
1
PSTEX(1) 8 September 1988
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!)
/_p_s_b_o_x{_f_i_l_e}
Include file.ps at natural size.
/_p_s_b_o_x[_s=_0._7]{_f_i_l_e}
Include the document at natural size scaled down to
70%.
/_p_s_b_o_x[_w=/_c_o_l_u_m_n_w_i_d_t_h, _s_c_a_l_e=/_m_y_d_o_c_s_c_a_l_e]{_f_i_l_e}
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 _p_s_d_i_r_s Specify different area for postscript files to be
included. _P_s_d_i_r_s 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
2
8 September 1988 PSTEX(1)
contains pointers to _p_s_t_e_x.
file.ps
EPSF PostScript picture files.
file.psz
File generated by _p_s_t_e_x 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 _p_s_t_e_x. After adding a new figure, or
changing the specification in the LaTeX, you need to run
LaTeX, then _p_s_b_o_x, 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
_P_s_t_e_x was written by Neil Hunt at Schlumberger Palo Alto
Research, now at Teleos Research: Neil%Teleos.com@ai.sri.com
3
|