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.
General ⇒ Error message
Error message
- Attachments
-
- JanuaryVersion.log
- (6.58 KiB) Downloaded 193 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

Re: Error message
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.
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.
Re: Error message
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).
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).
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Error message
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.workerbee wrote:[...] Just a question, in general, when including graphics in the files, do they ALL have to be the same format? [...]
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10