Search Contact information
University of Cambridge Home Department of Engineering
University of Cambridge >  Engineering Department >  computing help
next up previous contents
Next: psfrag: adding maths to Up: Graphics Previous: Graphics

Postscript

pdflatex supports JPEG, PNG andPDF images - but not postscript. latex supports Postscript files as long as they have a proper bounding box comment; i.e. LATEX requires full Encapsulated Postscript as produced by (for example) Xfig on Unix. 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{article}
\usepackage{graphicx}
then include the postscript file using the following commands
\begin{figure}[htbp]
\includegraphics{yourfile.eps}
\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', then 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.



 
next up previous contents
Next: psfrag: adding maths to Up: Graphics Previous: Graphics
© Cambridge University Engineering Dept
Information provided by Tim Love
2006-07-27