3

I just did a clean install of windows 10, and I'm trying to get latex up and running again.

I just installed the basic MikTex 2.9 package and TexMaker. I gave MikTex the authority to install packages on the fly without asking.

The first problem that I have run into is that my figures are no longer compiling.

The code:

\usepackage{mathptmx}
\usepackage{graphicx}
\usepackage{times}


\begin{figure}[h!] 
\centering 
\includegraphics[width=\columnwidth]{PercentageGraph} 
\caption{Accuracy in visual degrees versus how much of the data
    can be expected to fall within that radius. } 
\end{figure}

PercentageGraph.png is in the same directory as all my other documents.

The error that latex reports:

!LaTeX Error: File `PercentageGraph' not found.  
See the LaTeX manual or LaTeX Companion for explanation.  
Type H <return> for immediate help.
...
l.326 ...hics[width=\columnwidth]{PercentageGraph}  
I could not locate the file with any of these extensions:  
.eps,.ps,.eps.gz,.ps.gz,.eps.Z,.mps  
Try typing <return> to proceed.  
If that doesn't work, type X <return> to quit.

Am I reading that correctly that it is no longer searching for png, jpeg, pdf, etc? How do I put those file extensions back into the search criteria for images?

  • 5
    You're probably compiling with LaTeX (shortcut F2) instead of pdfLaTeX (shortcut F6). When compiling in DVI-mode, i.e. with latex, only EPS-images are allowed, while with pdflatex you can use PNG, JPG or PDF. – Torbjørn T. Jan 7 '16 at 20:38
2

You were using latex to generate a document (shortcut F2 in Texmaker), and in that case you can only include EPS files. To be able to include JPEG and PNG image you need to use pdflatex (shortcut F6). lualatex and xelatex can also handle JPEG and PNG.

See also Which graphics formats can be included in documents processed by latex or pdflatex?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.