Introduction to the Unix Cluster. Node: Figures

PREV Styles UP Features next

Including PostScript Graphics

There also exist several style options for including PostScript graphics:

Often, graphics are produced by separate programs, converted into PostScript, and then included by inserting special commands in the appropriate section of the text file. To convert a gmeta graphics file into PostScript, type either:

        ctrans -d ps.mono gmeta > gmeta.ps

or,

        gplot -dPS gmeta > gmeta.ps        

Again, the convention is to add the extension `.ps' to PostScript files. Both commands will convert the metafile into PostScript and redirect the output to the specified file. However, users have sometimes complained of problems using one method and not the other, which is why both methods have been included here. When the command is run, the computer will inform you of whether the metafile could be `encapsulated,' or put into a form from which the computer can read dimensions for insertion into the text file.

To include an encapsulated file in the LaTeX file, first specify the epsf option in the document style command:

        \documentstyle[epsf](style)

At the specific location for the figure in the document, include the following commands:

        \begin{figure}
        \epsffile{gmeta.ps}
        \caption{You can insert a caption with this command...}
        \end{figure}

If the metafile couldn't be encapsulated, you would have to guess the dimensions of the figure through trial-and-error. The computer processes dimensions in terms of `points'---replace the second line above with the estimate of \epsffile[100 100 200 200]{gmeta.ps} and work from there. If you fail to provide dimensions for an un-encapsulated PostScript file, the computer will use default point values. Afterwords, you can dvips the LaTeX file (the computer will take care of the figure insertion for you) and preview the file using ghostview.

PREV Styles UP Features next