Graphics, Figures & Tablesgetting a graphic to appear in pdf document

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
vasco
Posts: 3
Joined: Wed Mar 11, 2009 12:59 pm

getting a graphic to appear in pdf document

Post by vasco »

I have been using Latex for a while now for mathematical stuff. I would like to include a graphic file (.jpg etc) into my document. I have managed to do this and then got it to appear in my file if I use latex--> dvi, but not for latex--> pdf.
Is there any way this can be done?

Recommended reading 2024:

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

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

phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Re: getting a graphic to appear in pdf document

Post by phi »

How did you manage to do this? It should be the other way round: pdfTeX supports JPEG images in PDF mode, but not in DVI mode.
vasco
Posts: 3
Joined: Wed Mar 11, 2009 12:59 pm

Re: getting a graphic to appear in pdf document

Post by vasco »

I put the following lines into my Latex file:

\begin{figure}[htbp]
\includegraphics{RTR8.03-75dpi.eps}
\end{figure}

Then I chose the option to generate a PDF file - result: all text is there but no graphic.
Choosing the option to generate a DVI file - result: text and graphic.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

getting a graphic to appear in pdf document

Post by localghost »

In your initial post you spoke about JPG files included in a DVI output. Now you provide a code snippet that shows an EPS file included. This is a contradiction. EPS is not accepted by pdflatex and you should get corresponding warnings in the log file about files that could not be found. You can convert EPS files to PDF with the command line tool epstopdf or "on the fly" with the epstopdf package. But this is only worth if the EPS files are originated in this vector format (i. e. by a software). You can find more about converting between different formats by using the search function of the forum.
vasco
Posts: 3
Joined: Wed Mar 11, 2009 12:59 pm

Re: getting a graphic to appear in pdf document

Post by vasco »

Apologies for the mix up. Thanks very much for the information.
Post Reply