To generate PDF files from TeX, use the package "pdftex". Documentation can be found in one of the directories
(depending on whether you are using a Solaris or Linux system, respectively). For most latex, amstex, or tex files, you can produce a pdf file just by prepending pdf to the name of the command; e.g.,
you can then open the new file inside Adobe Acrobat Reader with the command:
If for any reason pdflatex fails to work (e.g., it complains about some font that you are using, or it cannot include a PostScript figure), there is an alternative way of creating pdf files:
latex filename dvips -Pwww -o filename.ps filename ps2pdf filename.ps filename.pdf
There is a way to include encapsulated PostScript (.eps) files when using pdflatex: you must convert them to pdf first:
Other image formats are also supported.
One other way to convert postscript files to pdf is to use ImageMagick's convert command:
convert file.ps file.pdf
Usually, pdftex will accept any input that tex will (and likewise for pdflatex and latex), but an exception is the handling of graphics files. Pdftex will only accept graphics files in pdf, jpeg, png, and mps (Metapost) formats. Graphics in other formats need to be converted to an acceptable format.
For example, if a LaTeX file pdftest.tex referred to a file pdftestfig.eps in Encapsulated PostScript format, you could create a dvi file in the normal way:
but to create a pdf file requires an extra step to convert the eps file to pdf format:
epstopdf pdftestfig.eps pdflatex pdftest
The epstopdf command only needs to be executed once (per figure) initially, plus once every time the figure changes.
Having latex refer to one type of file and pdflatex refer to a different file type requires a little trickery within the tex file. Sample pdftest.tex and pdftestfig.eps files are available to illustrate how to do this.
Metapost output is accepted by both (la)tex and pdf(la)tex. Unfortunately, if it contains text, it is not accepted by xdvi.
The NSF FastLane system now accepts files in many formats, including pdf, PostScript, and dvi. For best results, though, use pdftex or pdflatex to produce a pdf file.
In the recent past, FastLane refused to accept pdf files produced in the newest version of the pdf format, but this restriction is no longer in place, and the oldpdf(la)tex command is no longer necessary.
Last updated 7 July 2003