GeneralError message

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
workerbee
Posts: 43
Joined: Sat Nov 22, 2008 1:53 am

Error message

Post by workerbee »

Hi All,

A colleague of mine was compiling a document where .eps files are used in conjunction with psfrag and got an error message. We were wondering what exactly went wrong since when I compile these images separately (from the rest of the article), it works fine. Any feedback or suggestions would be most appreciated, thanks!

Attached is the log file.
Attachments
JanuaryVersion.log
(6.58 KiB) Downloaded 191 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Error message

Post by frabjous »

Without taking some further steps, you can't use pdflatex to compile a document with .eps figures--you need to use plain latex instead. The log file suggests pdflatex was used.

If you need a pdf, the easiest way around it is to use latex, then dvips to make a .ps file, and then ps2pdf to make a PDF. There are other options too -- search the forum for suggestions, since this comes up a lot.
workerbee
Posts: 43
Joined: Sat Nov 22, 2008 1:53 am

Re: Error message

Post by workerbee »

Thanks, Frabjous!

I forgot to ask him how exactly he was compiling, assuming he was doing the same thing as I was.

I did manage to get it to work when I changed images that were originally in a .pdf format to .eps (so all images were in .eps format).

Just a question, in general, when including graphics in the files, do they ALL have to be the same format?

(BTW, I was using .eps for some so I could use the psfrag to replace labels with the Latex type).
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Error message

Post by localghost »

workerbee wrote:[...] Just a question, in general, when including graphics in the files, do they ALL have to be the same format? [...]
That depends on the compiler engine. For the latex compiler all graphics files have to be present in EPS format because it is the only graphics format this compiler accepts. The pdflatex compiler accepts JPG, PNG and PDF format thus pictures can have one of this format. Different formats can be mixed in one document. JPG format is preferred for photography, whereas PNG can be used for any kind of drawings. Both formats are pixel based. The vector based PDF format should be used for high quality diagrams. Many data processing programs can export either PDF or EPS (or even both). The latter one can easily be converted.


Best regards
Thorsten
Post Reply