2

I am new to LaTeX and trying to learn it by writing a CV. I tried to add a photo of me in the document. The code is below:

\documentclass[a4paper, 12pt]{article}

\usepackage{graphicx}

\begin{document}
  \begin{figure}[h!]
    \centering
      \includegraphics[width=0.5\textwidth]{taufique}
  \end{figure}
\end{document}

'taufique' is the name of the jpg image file. It's located in the same directory where tex file is placed. I compiled with pdflatex but it is not being compiled. Error report says that compiler can't find the image file. What's the problem?

taufique
  • 232
  • Try to use \includegraphics[width=0.5\textwidth]{taufique.jpg}. If you are on a Unix-like system there might also be some confusion, if the file has the extension .JPG or .jpeg, in whatever combination ... –  Apr 14 '14 at 19:24
  • You need to compile with pdflatex, not latex. Have you done this? – Werner Apr 14 '14 at 19:25
  • Christian, Did that. Not working. Werner, Yes I did. I mentioned it in the question too. – taufique Apr 14 '14 at 19:27
  • @taufique: 'Silly question' by me: Do you have read access to that graphics file? –  Apr 14 '14 at 19:29
  • @ChristianH, saw the properties. Both read and write is permitted. – taufique Apr 14 '14 at 19:40
  • @taufique: Did you try the tests with your MWE you posted above or are you using another file? Did you test, whether you can include some graphics file, 'just for fun'? –  Apr 14 '14 at 19:44
  • @ChristianH. didn't get you, sorry. – taufique Apr 14 '14 at 20:29
  • @taufique: Did you try to include some other graphics file, just in order to see, whether that works? –  Apr 14 '14 at 20:32
  • No I didn't. I am very new to it. I just copied and pasted the code from latex wikibook. Can you shade me more light. – taufique Apr 15 '14 at 05:34
  • As it stands, this looks like the usual 'what file formats' issue: we'll need a log file to get any further. – Joseph Wright Sep 07 '14 at 10:58

0 Answers0