Go to the first, previous, next, last section, table of contents.

Using the EPSF macros

Once the figure file has a bounding box comment (see the previous section,) you are ready it the graphic into a TeX document. Many packages for using EPS files exist. One distributed with Dvips is the files `epsf.tex' (for plain TeX) and `epsf.sty' (for LaTeX). For plain TeX, add a line like this near the top of your input file:

\input epsf

If you are using LaTeX 2e, use the `graphics' or `graphicx' package. If you are using LaTeX 2.09, add the `epsf' style option, as in:


In any case, the above only needs to be done once, no matter how many figures you plan to include.

Now, at the point you want to include a file, enter a line such as:


If you are using LaTeX, you may need to add \leavevmode immediately before the \epsffile command to get certain environments to work correctly. If your file does not have a bounding box comment, you can supply the numbers as determined in the previous section, in the same order they would have been in a normal bounding box comment:

\epsffile[100 100 500 500]{foo.ps}

Now, save your changes and run TeX and Dvips; the output should have your graphic positioned at precisely the point you indicated, occupying the proper amount of space.

The \epsffile macro typesets the figure as a TeX \vbox at the point of the page that the command is executed. By default, the graphic will have its `natural' width (namely, the width of its bounding box). The TeX box will have depth zero and its natural height. By default, the graphic will be scaled by any DVI magnification in effect, just as is everything else in your document. See the next section for more information on scaling.

If you want TeX to report the size of the figure as a message on your terminal when it processes each figure, give the command:


Go to the first, previous, next, last section, table of contents.