Student Information Processing Board^{Massachusetts Institute of Technology}^{Room W20-557 • 253-7788} Using PostScript with TEX and �2a TE X

André DeHon

                           amdehon@athena.mit.edu

• Dvi2ps special command

Most versions of dvi2ps support the \special command and allow the psfile option.

This allows you to instruct TEX or LaTEX to insert the specified PostScript file into the PostScript output generated by dvi2ps. The following invocation followed this paragraph and instructed dvi2ps to insert the PostScript for the SIPB owl and the THiRD EAst squanch at the top left and right corners of the page:

                     \special{psfile=h1.ps hoffset=-36 voffset=250}

The \special command reserves no space for the included image. ΓIf you want to reserve blank space for the PostScript image, you must do so explicitly. See the man page for

dvi2ps for a detailed description of the \special command.

• PSbox Macro

A macro called psbox will insert a postscript file and enclose it in a TEX box of the size specified. However, it does not guarantee that you actually place the postscript in the box created since it has no idea where your PostScript file will actually be imaged. The two grumpy fuzzballs below were inserted using the following:

              \centerline { \psbox{1 in}{1.5 in}{g.ps}

                     \hskip 1 in \psbox{1 in}{1.5 in}{g.ps} }

The general usage of psbox is:

                     \psbox{width}{height}{filename}

On Athena, the psbox macro can be found in /mit/postscript/psbox.tex. When you want to use the psbox macro, remember to include the macro definition using a line like:

                     \input psbox.tex