Graphics, Figures & Tables ⇒ EPS figure not shown and how to include GIF image
EPS figure not shown and how to include GIF image
Hi
I recently started using LaTeX (MikTeX with the RevTeX 4 style package edited in TeXnic centre) to write a lab report, and whilst I like it so far, I have come across a couple of issues.
Firstly, i have put
\usepackage{graphics}
at the top and then my code for a figure is
\begin{figure}[h]
\includegraphics{C:/cygwin/home/Timmy/backup/computing_course/AFM/lennardjonespotential.eps}
\caption{lennard jones model for the van der waals force}
\label{fig:lennardjonespotential}
\end{figure}
But this doesnt load in the picture when I build it. Have I done something wrong or doesnt this mean there is a problem with my install? ive checked MikTeX to see i have installed the graphics package...
Also, i can't find any ways to either use a GIF/other "normal" image format or convert them to .ps/.eps, so any guidance on this would be appreciated.
Cheers
Tim
I recently started using LaTeX (MikTeX with the RevTeX 4 style package edited in TeXnic centre) to write a lab report, and whilst I like it so far, I have come across a couple of issues.
Firstly, i have put
\usepackage{graphics}
at the top and then my code for a figure is
\begin{figure}[h]
\includegraphics{C:/cygwin/home/Timmy/backup/computing_course/AFM/lennardjonespotential.eps}
\caption{lennard jones model for the van der waals force}
\label{fig:lennardjonespotential}
\end{figure}
But this doesnt load in the picture when I build it. Have I done something wrong or doesnt this mean there is a problem with my install? ive checked MikTeX to see i have installed the graphics package...
Also, i can't find any ways to either use a GIF/other "normal" image format or convert them to .ps/.eps, so any guidance on this would be appreciated.
Cheers
Tim
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
EPS figure not shown and how to include GIF image
You better use the graphicx package instead. Please be more precise when describing the error. Submit the complete error message given by the compiler. Note that the EPS format for graphics files is only accepted by latex, not by pdflatex. Avoid special characters (blank spaces, underscores) in both the path and the name of the file.Higgs wrote:[...] But this doesnt load in the picture when I build it. Have I done something wrong or doesnt this mean there is a problem with my install? ive checked MikTeX to see i have installed the graphics package [...]
The GIF format is not accepted at all. Before converting images you should think about your final output format. I remember that this issue occurred some time ago. The search function of the forum should help.Higgs wrote:[...] Also, i can't find any ways to either use a GIF/other "normal" image format or convert them to .ps/.eps, so any guidance on this would be appreciated. [...]
Best regards and welcome to the board
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
Re: LaTeX noob help
Ok, i tried using graphicx and still no luck, it just posts the caption and nothing else because it cant do the EPS file, throwing this error message at me
! LaTeX Error: Unknown graphics extension: .eps.
! LaTeX Error: Unknown graphics extension: .eps.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
EPS figure not shown and how to include GIF image
Obviously you are compiling with pdflatex, which doesn't support EPS but JPG, PDF and PNG. You can convert your EPS files to PDF. The search function of the forum yields lots of hits about this topic.Higgs wrote:Code: Select all
! LaTeX Error: Unknown graphics extension: .eps.
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
Re: LaTeX noob help
It is moments like this I realise how much I hate computers.
I tried outputting a jpeg version of the graph from gnuplot and loading that in, and it instead put a box on the page with some really large text over it (not the graph I was expecting). I decided to call it a day and go to bed. After a night's sleep, i turned on the computer, opened the report, hit build and it had the graph in there as expected! Cheers for the pointers about pdflatex and post script files.
I now have a much more minor 2 problems:
There is a lot of white space (about 4 lines) after my first sub-heading which never used to be there. Any ideas what might have caused this and how to get rid of it?
Also, my graph has the file's path written above it. How do I get rid of it?
I tried outputting a jpeg version of the graph from gnuplot and loading that in, and it instead put a box on the page with some really large text over it (not the graph I was expecting). I decided to call it a day and go to bed. After a night's sleep, i turned on the computer, opened the report, hit build and it had the graph in there as expected! Cheers for the pointers about pdflatex and post script files.
I now have a much more minor 2 problems:
There is a lot of white space (about 4 lines) after my first sub-heading which never used to be there. Any ideas what might have caused this and how to get rid of it?
Also, my graph has the file's path written above it. How do I get rid of it?
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
EPS figure not shown and how to include GIF image
Hi Higgs,
Stefan
that could be caused by spaces in the file name, don't use spaces in file names, have a look here.Higgs wrote: Also, my graph has the file's path written above it. How do I get rid of it?
Stefan
LaTeX.org admin
Re: LaTeX noob help
Cheers Stefan, that was the problem. There was a space in one of the folder names. I moved the image file and now its working great.
Still not a clue about the extra blank lines though. when i cut that whole section out and build, the next section aligns as it should...
Still not a clue about the extra blank lines though. when i cut that whole section out and build, the next section aligns as it should...
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
EPS figure not shown and how to include GIF image
Hi Higgs,
Stefan
check if \raggedbottom will a positive effect.Higgs wrote: Still not a clue about the extra blank lines though.
Stefan
LaTeX.org admin