Graphics, Figures & TablesLaTeX => PS => PDF producing error

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
pban92
Posts: 54
Joined: Sat Aug 09, 2008 9:34 am

LaTeX => PS => PDF producing error

Post by pban92 »

\usepackage{graphicx}
\usepackage{subfig}
\usepackage{graphics}

Looks like above packages got some issues with the compilation in my case. I have both jpg and eps figures. Without any eps figures, compilation on texniccenter is just perfect in LaTeX => PS => PDF mode.

\usepackage{graphicx}
\usepackage{subfig}
\usepackage{graphics}
\usepackage{epsfig}

Adding epsfig package only helps in LaTeX => PS => PDF mode, if the document has only eps figures.

I just dont figure which packages would help me having both jpg and eps figure and compile it in LaTeX => PS => PDF mode for a succeful pdf run.

Pls advise.

Cheers!

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

LaTeX => PS => PDF producing error

Post by localghost »

pban92 wrote:[...] Adding epsfig package only helps in LaTeX => PS => PDF mode, if the document has only eps figures. [...]
That's quite usual since latex only accepts EPS files. And by the way, use only the graphicx package, whatever the format of your graphics files may be. For graphics formats in dependence on the compiler engine use the forum search.
pban92 wrote:[...] I just dont figure which packages would help me having both jpg and eps figure and compile it in LaTeX => PS => PDF mode for a succeful pdf run. [...]
You can convert the EPS files to PDF for compilation with pdflatex. Use either the command line tool epstopdf or the epstopdf package for conversion "on the fly". Note the instructions about the requirements (shell escape) in the package manual. Or use the forum search.

In case the remarks above fix your problem, please mark the thread as solved by editing your initial post and choosing the green checkmark from the icon list.


Best regards
Thorsten
pban92
Posts: 54
Joined: Sat Aug 09, 2008 9:34 am

LaTeX => PS => PDF producing error

Post by pban92 »

That's quite usual since latex only accepts EPS files.
I am sorry but if that is the case how come jpg files are sucessfully compiled?
...or the epstopdf package for conversion "on the fly"
Then I understand that the following packages would enable to compile without any error in LaTeX => PS => PDF which was wrong.
\usepackage{graphicx}
\usepackage{epstopdf}

I have been searching for the options for how to compile tex document containing both jpg and eps figures without taking the trouble of conversion.

I think it is not possible. Am I right or wrong?

Many thanks!
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

LaTeX => PS => PDF producing error

Post by localghost »

pban92 wrote:[...] I am sorry but if that is the case how come jpg files are sucessfully compiled? [...]
The pdflatex compiler engine accepts external graphics files in JPG format as well as PNG and PDF.
pban92 wrote:[...] Then I understand that the following packages would enable to compile without any error in LaTeX => PS => PDF which was wrong.
\usepackage{graphicx}
\usepackage{epstopdf}

[...]
The epstopdf package works only with the pdflatex compiler engine.
pban92 wrote:[...] I have been searching for the options for how to compile tex document containing both jpg and eps figures without taking the trouble of conversion.

I think it is not possible. Am I right or wrong?
Right. But I see no problems in converting the files.
Post Reply