1

It is apparently a well known error to get this when putting a graphic into your document, as can be seen here, here, and here.

\begin{figure}[h]
\caption{Example of a parametric plot ($\sin (x), \cos(x), x$)}
\centering
\includegraphics[width=0.8\textwidth,natwidth=610,natheight=642]{example}
\end{figure}

I've tried these, and some of them don't work, and others will not make latex crash, but will still not display the image. Example is a file, and I have saved it and tried this many times, with the format being wither jpeg, png, or eps.

The issue that I am having is (I believe) due to a combination of my latex configuration and the template I am using. Using another template is unacceptable,because it needs to be in this format.

I am able to use the same command in a new document with article template and the image prints fine. As well, a friend on a Mac (I'm not sure of the latex distribution she is using) said that she was able to put an image in no problem.

As for me, I am using miktex 2.9 with the editor Kile, although I receive the same error when I try it in texworks.

Any suggestions or guidance?

Thanks!

  • You should never need to specify `natwidth=610,natheight=642 although if you do specify it it needs to be before width=0.8\textwidth – David Carlisle Oct 09 '15 at 13:53
  • are you using latex (should be able to input .eps) or pdlfatex (should be able to input png or pdf) – David Carlisle Oct 09 '15 at 13:55
  • The natwidth was a suggestion from one of the posts above. In kile, I have it compile in pdflatex, and then quickbuild in pdflatex+ViewPDF – RayVelcoro Oct 09 '15 at 14:03
  • 1
    but are these values the correct size for your image ?? but as I note in my answer, the class is incompatible with pdflatex (and most other tex developments in the last 20 years) – David Carlisle Oct 09 '15 at 14:15

1 Answers1

4

The thesis class you are using includes the line

\RequirePackage[dvips]{graphicx}

that is basically just wrong, and you should report it to the maintainers.

As it is (if you can't delete the [dvips] from your local copy) the class only works with latex followed by dvips, not with pdflatex or luatex or xetex.

As such the EPS file should work (in which case it should have a Bounding Box, otherwise it is not an EPS file) the other formats you mention will not work.

The distribution also includes epsf.sty for including images which is somewhat bizarre since latex has had a standard \includegraphics command for including images since 1994.

the page is dated 2008, which is not exactly the current but most of the files are using tex conventions from last century.

David Carlisle
  • 757,742
  • In what file do you see \RequirePackage[dvips]{graphicx}?...Actually, I see it in the ruthesis file. – RayVelcoro Oct 09 '15 at 14:07
  • @RayVelcoro ruthesis.cls which is i assume the class you are using not surprising it looks dated, since it has a date of \ProvidesClass{ruthesis}[1995/11/21 – David Carlisle Oct 09 '15 at 14:11
  • I guess some things never change... I went ahead and deleted the [dvips] part, and now it seems to be working. Thank you very much! – RayVelcoro Oct 09 '15 at 14:18
  • What would explain it working on my friends mac? If you have a moment, could you explain it? I don't exactly understand the interworkings of latex, and this seems like a good learning experience. – RayVelcoro Oct 09 '15 at 14:23
  • @RayVelcoro they must have fixed it (or used latex not pdflatex) – David Carlisle Oct 09 '15 at 14:25