[Univ of Cambridge] [Dept of Engineering]
next up previous contents
Next: psfrag: adding maths to Up: Graphics Previous: Graphics

Postscript

It's easy to incorporate Postscript files as long as they have a proper bounding box comment; i.e. LATEX requires full Encapsulated Postscript as produced by (for example) xv and xfig on the HPs. If the file hasn't got a BoundingBox line near the top, you can use ps2epsi to generate one. Wherever the postscript file comes from, simply use

\documentclass[dvips]{article}
\usepackage{graphicx}
then include the postscript file using the following commands
\begin{figure}[htbp]
\includegraphics{yourfile.ps}
\end{figure}
LATEX can cope with compressed postscript files too, but since latex can't read the BoundingBox line from the compressed file, you need to provide it. If your compressed file's called yourfile.ps.gz, copy the BoundingBox line into a file called yourfile.ps.bb. Then the following works
\begin{figure}[htbp]
\includegraphics{yourfile.ps.gz}
\end{figure}

Just about all of the following facilities use postscript. You'll need to run latex to generate `foo.dvi'. This file can be viewed by the latest xdvi program, which can cope with embedded postscript. Run dvips -o foo.ps foo.dvi to convert the resulting DVI/postscript file to pure postscript. This will produce a file that can be previewed with ghostview or gs. On the teaching system this file can be printed out using plotview or

  lp -dljmr1 -opostscript foo.ps

See the Creating and Printing graphics on PC, Mac, SUN and HP machines and Xfig handouts for more details.



 
next up previous contents
Next: psfrag: adding maths to Up: Graphics Previous: Graphics
Tim Love
1999-08-05