For example, the file MyDoc.pdf is the product of our sample LaTeX document MyDoc.tex after it has been compiled with LaTeX and converted to PDF. There are basically two ways to get the PDF file.
unix> latex MyDoc.tex (creates MyDoc.dvi) unix> dvips -Ppdf MyDoc.dvi -o (creates MyDoc.ps) unix> ps2pdf MyDoc.ps (creates MyDoc.pdf)There is a command dvipdf, which actually combines the latter two commands, so the above could be reduced (if you don't need the intermediate PostScript file) to
unix> latex MyDoc.tex (creates MyDoc.dvi) unix> dvipdf MyDoc.dvi (creates MyDoc.pdf)while still allowing PostScript images/tricks.
The negative side of the above methods is that they use ghostscript to interpret and convert the PostScript, and older versions will degrade the quality of the fonts.
Another benefit is that you can insert JPEG, PNG and PDF graphics into your document. The negative side of this is that pdflatex will not support some PostScript images or operations. If you want to insert figures, they must be in either PDF, JPEG or PNG format. You can convert your Encapsulated PostScript images to PDF using epstopdf, then include them with the LaTeX macro \includegraphics{}. So, for example, the image included in section 3 must first be converted to PDF, then the inclusion command is \includegraphics{diagram.pdf}. The steps to converting straight to PDF:
unix> epstopdf diagram.eps (creates diagram.pdf) unix> pdflatex MyDoc.tex (creates MyDoc.pdf)