1

I'm having trouble inserting a picture into my LaTex document (using Texmaker). Does anyone know why this may be? This is the code I am using:

\documentclass[11pt]{article}
\usepackage{graphicx}

\begin{document}

\begin{figure}
\includegraphics[scale=1]{fig.1}
\end{figure}

\end{document}

It is giving me the error:

! LaTeX Error: Unknown graphics extension: .1.See the LaTeX manual or LaTeX Companion for explanation.Type H <return> for immediate help.... \includegraphics[scale=1]{fig.1}
! Output loop---100 consecutive dead cycles.\clearpage ...rite \m@ne {}\vbox {}\penalty -\@Mi \end{document}
File `fig.1' not found
Johannes_B
  • 24,235
  • 10
  • 93
  • 248
  • Welcome to TEX.SX. The problem seems to be with the *.1. try renaming the file to fig1, the compiler thinks .1 is the file extension. – Elad Den Oct 09 '16 at 09:24
  • You can also use package grffile. – Johannes_B Oct 09 '16 at 09:35
  • @Johannes_B or the package graphicx :-) – David Carlisle Oct 09 '16 at 09:36
  • your question is unclear and could refer to one of two problems (with slightly different answers) is your actual file fig.1.png but graphicx isn't adding the .png extension, or is teh actual file fig.1 but graphicx doesn't know it is png or eps or whatever it is? – David Carlisle Oct 09 '16 at 09:42
  • The file was fig.1 so I suppose graphicx may not have know it was a png. I have just changed it to Figure one and it is working now. – user116002 Oct 09 '16 at 09:46

0 Answers0