|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T p
Length: 9345 (0x2481) Types: TextFile Names: »pstex.tex«
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12 └─⟦af5ba6c8e⟧ »unix3.0/DVIWARE.tar.Z« └─⟦ca79c7339⟧ └─⟦this⟧ »DVIware/laser-setters/mctex/doc/pstex.tex«
\subsection{\pstex} %\pstex was written by Louie Mamakos at the University of Maryland. \def\psfig{Psfig/\TeX} The \pstex\ program converts a \dvi\ file to be printed on a \ps\ printer. \ps\ is a remarkably flexible language, and \pstex\ sports a remarkable collection of options. The program allows the use of built-in \ps\ fonts instead of or in addition to the regular \TeX\ fonts, provided that the system administrator installs various files (detailed in \S\ref{sec:installation:pstex}). Your {\it Local Guide\/} should describe how to do this, perhaps by running a special version of \TeX\ or \LaTeX. The \pstex\ program also allows insertion of ordinary \ps\ commands via \TeX's \verb|\special|, and works with \psfig.\footnote {A copy of \psfig\ is included with the \mctex\ distribution. See the \psfig\ User's Guide for details.} The various command line options are summarised in Table~\ref{tab:pstex}. \begin{table*} \centering \begin{tabular}{|@{\coltt}lp{5in}|} \hline \multicolumn1{|c}{\bf Option} & \multicolumn1{c|}{\bf Description} \\ \hline -c & \pstex\ is actually a shell script that executes \dvips, which converts your \dvi\ file, and sends the output to the printer. Normally, \pstex\ copies the output of \dvips\ to a file before sending it to the printer. If there is an error while translating the file, the output is not sent to the printer, saving paper if there is a problem with your file. The {\tt -c} option forces output to be sent directly to the printer, should that prove useful. \\ -d \it drift & This rarely used parameter controls the {\em drift\/} of a document. See \S\ref{sec:drift}, p.~\pageref{sec:drift}, for details. \\ -e \it engine & This names the kind of print engine used in your \ps\ printer. The default is {\tt canon}. \\ -m \it mag & This applies a global magnification to the output. See \S\ref{sec:dvimag}, p.~\pageref{sec:dvimag}. \\ -o \it option & This applies a document option, such as {\tt draft} or {\tt landscape}. See Table~\ref{tab:pstex:opts}. \\ -p & This disables page-reversal, or (if normally disabled) enables it. Page-reversal causes your document to be printed in collated order on most \ps\ printers. \\ -r \it res & This specifies the resolution of the print engine in dots per inch, normally 300. \\ -s & This disables the \cccount\ numbers that are normally printed when your document is being processed. \\ -I \it file & Copies (`includes') the named {\it file\/} into the \ps\ output after the prologue. {\tt Pstex} will look first in the standard prologue directory {\tt /usr/local/lib/tex/ps}, then in the current directory. To prevent a standard file being used, give a full path name. A number of different {\tt -I} options can be used; the files will be concatenated in order. \\ -L \it dir & Changes the prologue (`library') directory to {\it dir}. \\ -N & This inhibits inclusion of the standard prologue file. Mainly useful for debugging, with the {\tt -I} option. \\ \usebox\xy & These are added to the margin border width, i.e. they are relative displacements. Normally, your document is offset from the border by one inch. Offsets are in thousanths of an inch and may be negative. \\ \hline \end{tabular} % \caption{Options for \pstex}\label{tab:pstex} \end{table*} The available document options (given with the {\tt -o} flag) are listed in Table~\ref{tab:pstex:opts}. They are split into three categories: {\em modes}, {\em sizes}, and {\em other}. More than one document option can be used, but certain options are not compatible with others. In particular, only one of each mode or size should be used.\footnote {At the moment, the last mode or size named `wins', but this could change without warning.} The paper mode options are specific to particular kinds of \ps\ printers and may differ at your site. Consult your {\it Local Guide\/} to be sure. The mode options automatically imply their corresponding size option. You should normally be able to use the mode without the size; the latter simply tells the printer that it should pretend it has the right sized paper, without making it actually switch paper trays or set up its memory for it. This size options are really intended for use by the system installer. (See section~\ref{sec:installation:pstex} if you want the details.) \begin{table*} \centering \begin{tabular}{|@{\coltt}llp{4.5in}|} \hline \multicolumn1{|c}{\bf Name}& \multicolumn1c{\bf Category}& \multicolumn1{c|}{\bf Action}\\ \hline draft & other & Prints a halftoned (`see-through') `draft' on each page, useful for making sure no one thinks your document is final.\\ landscape & other & Rotates the output by ninety degrees, so that an $8.5 \times 11$ inch page becomes an $11 \times 8.5$ inch page. Landscaping may be applied to any paper size and mode.\\ manualfeed & other & Sets the `manual paper feed' flag in the statusdict, switching the printer to manual paper feed mode.\\ a4 & mode & Sets up the printer for A4 (European) paper.\\ a4size & size & Declares A4 size paper.\\ legal & mode & Sets up the printer for legal size paper ($8.5 \times 14$ inch). This mode takes quite a bit of the printer's memory.\\ legalsize & size & Declares legal size paper.\\ letter & mode & Sets up the printer for the usual `letter' mode, for $8.5 \times 11$ inch paper.\\ lettersize & size & Declares letter size paper.\\ note & mode & Sets up the printer much like `letter' mode, except that the imageable region (the part of the paper \TeX\ can use) is smaller, using less of the printer's memory. Some jobs that cause VMerrors in other modes can be printed this way.\\ notesize & size & Declares note size paper (this is identical to {\tt lettersize}; it exists only for orthogonality).\\ \hline \end{tabular} \caption{\pstex\ Document Options}\label{tab:pstex:opts} \end{table*} If a document takes too much of the printer's memory (causing `VMerror' messages, or on some \ps\ printers, sometimes even crashing the printer), it may help to split the file with \dviselect. In particular, separating title pages (which tend to use a variety of large fonts) may help quite a lot.\footnote {Someday, \dvips\ may handle this itself. Unfortunately, there is no really good way to tell how much space to use.} There are two ways to include \ps\ files in \TeX\ documents. The easist is to use \psfig. Read the \psfig\ Usr's Guide to find out how to do this. \psfig requires `\%\%BoundingBox' comments (`Encapsulated \ps' format), and not all \ps\ generators include such comments. Hence, there is a more primitive method described here. The \TeX\ construct \verb|\special{psfile=myfile}| tells \pstex\ to read the file {\tt myfile} and include its contents in the current \TeX\ page. Unlike \psfig, no space is made for the figure. It is simply drawn in standard \ps\ coordinates, translated so that the point $(0,0)$ is wherever \TeX\ was when you wrote the \verb|\special|. Various keywords can be applied to alter the coordinate system. For instance, \begin{quote} \begin{verbatim} \special{psfile = myfigure.ps, hoffset = 72, vscale = 1.5} \end{verbatim} \end{quote} includes the file {\tt myfigure.ps}, shifting it 72 points (one inch) to the right, and scaling it vertically to half again its normal height. See Table~\ref{tab:pstex:spcl} for the list of keywords. The file name may not contain an equal sign, comma, semicolon, colon, or white space unless it is quoted: \begin{quote} \begin{verbatim} \special{psfile="a very, very strange file name;:=!"} \end{verbatim} \end{quote} To include a quote, quote it with backquote; to include a backquote, write it twice: \begin{quote} \begin{verbatim} \special{psfile = "a weird ``example`""} \end{verbatim} \end{quote} reads the file \mbox{`{\tt a weird `example"}'}. You may include as much or as little white space as you like around the keyword and value.\footnote {Equal signs count as white space, so that {\tt\string\special\char`{psfile foo\char`}} and {\tt\string\special\char`{psfile===foo\char`}} act identically. Depending on this is, however, unwise.} Other \dvi-to-\ps\ conversion programs require that you use none, so you may want to avoid white space for portability reasons. \begin{table*} \centering \begin{tabular}{|@{\coltt}lll|} \hline \multicolumn1{|c}{\bf Name} & \multicolumn1c{\bf Type} & \multicolumn1{c|}{\bf Value}\\ \hline psfile & string & name of file to be included\\ hsize & floating & horizontal size---clips points that extend too far\\ vsize & floating & vertical size---clips points that extend too far\\ hoffset & floating & horizontal offset (x translation)\\ voffset & floating & vertical offset (y translation)\\ hscale & floating & horizontal scale factor\\ vscale & floating & vertical scale factor\\ \hline \end{tabular} \caption{\pstex\ {\tt\string\special} Keywords}\label{tab:pstex:spcl} \end{table*} Both \psfig\ and the \verb|\special{psfile=myfile}| inclusion facility disable the {\tt showpage} operator, so that included figures do not emit partial pages. If a figure is supposed to be on a page by itself, be sure to tell \TeX\ or \LaTeX\ to do this. Changes made by included files are automatically undone. The only way to get global changes is to use the {\tt -I} option.\footnote {Actually, included \ps\ code can escape these restrictions, but only at the risk of breaking in the future.}