Next: Preparing Plots for the Web Up: Preparing Printed Output Previous: Processing, previewing and printing

# Using plt with pdfLATEX

Most of the techniques described in this chapter for preparing PostScript output from LATEX documents and .eps format plt figures will work without changes if you use pdfLATEX to prepare PDF output from LATEX documents and .pdf format plt figures. If you are creating figures specifically for inclusion in a PDF document, use a command of the form

```plt -T lw ... | lwcat -pdf >fig.pdf
```
to make a PDF figure. If you have already generated a PostScript figure, use a command such as
```epstopdf fig.ps
```
to make fig.pdf from an existing fig.ps. (epstopdf is freely available from CTAN, http://www.ctan.org/.) It is usually not necessary to make any changes to an existing LATEX source document in order to format it using pdfLATEX; thus, for example, your document should still use the epsfig package, even though your included figures will be in PDF rather than EPS format. When you specify the names of the figure files, always use the form
```\epsfig{file=fig}
```
If you avoid writing file=fig.ps or file=fig.pdf, then the correct version of your figure will be chosen automatically when formatting your document with latex and dvips or with pdflatex.

The only feature of epsfig described in this appendix that is not currently supported by pdfLATEX is the clip= option, which is ignored. If you are reading the PDF version of this book, the figure in section B.3 illustrates the results; you should avoid using the clip= option if you anticipate using pdfLATEX.

Using pdfLATEX to format myfile.tex is a one-step process:

```pdflatex myfile
```

Unless there are errors, this command should produce myfile.pdf, which can be viewed using gv, xpdf, Acrobat, or any other PDF reader.

Next: Preparing Plots for the Web Up: Preparing Printed Output Previous: Processing, previewing and printing
George B. Moody (george@mit.edu)
2005-04-26