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