Friday, March 26, 2010

Latex - compile from PS -> PDF

I'm a total n00b (sp?) when it comes to Latex. Today, I had to compile a latex file with .eps files in it. When hitting the Typeset button in Emacs, there was an error: "Latex Error: Unknown graphics extension: .eps." What? Google searches were vague, difficult to interpret because I'm a n00b. I finally found some documentation that mentioned converting directly from Latex => PDF won't work when using EPS images. Instead, you need to convert from Latex => PS => PDF. OK, how do I do this??

This website offered the solution I was looking for: Basically, from the command line, you can use the following commands when in the directory that your .tex file is in:

latex [texfile].tex
dvips -o [texfile][.dvi]
ps2pdf file.pdf
open file.pdf

Substitute the correct file names in the commands above with your own! The last line will open your new latex pdf file.

Happy latexing!

No comments:

Post a Comment