1

EDIT: I solved this by replacing 'figure' with 'figure*'. Thank you all for your input.

I'm using Texmaker and MiKTeX on Windows 10. The file compiles without any issues but the pdf isn't available. When trying to open it with Texmaker, I receive the message: "Error: File not found". When opening the pdf manually with Adobe Acrobat it reads: "Adobe Reader could not open … because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn’t correctly decoded)."

I know for certain that this is due to the figure I tried to add to the text. If I remove the \includegraphics{} command and compile again, I can view the pdf.

Here's the preamble:

\documentclass{article}
\usepackage{fixltx2e}
\usepackage{multicol}
\usepackage{graphicx}
\graphicspath{ {C:/Users/dawid/Documents/figures} }

And the code with which I tried to add the figure:

\begin{figure}
  \includegraphics{example-image}
  \caption{lipsum}
\end{figure}

There is a .jpg file in the /figures folder. I tried replacing it with a .eps file, reinstalling Texmaker, and refreshing file name databases in MiKTeX, unsuccessfully.

I also receive the message that fixltx2e isn't required, but removing \usepackage{fixltx2e} doesn't make a difference.

Edit: I tried making a MWE:

\documentclass{article}
\usepackage{graphicx}
\graphicspath{ {C:/Users/dawid/Documents/figures} }

\begin{document}
\begin{figure}
  \includegraphics{example-image}
  \caption{lipsum}
\end{figure}
\end{document}

Here I noticed the file doesn't actually look for the image in /figures but in the folder the .tex file is in. Nonetheless, if I place the image in that folder, I can view it correctly in the pdf with the code above, so I can work with that. However, I want the text to display in two columns:

\documentclass{article}
\usepackage{multicol}
\usepackage{graphicx}
\graphicspath{ {C:/Users/dawid/Documents/figures} }

\begin{document}
\begin{multicols}{2}
\begin{figure}
  \includegraphics{example-image}
  \caption{lipsum}
\end{figure}
\end{multicols}
\end{document}

Here the file complies and I can view the pdf, but it's completely empty. It seems as if 'multicol' messes with 'figure'.

  • 2
    Welcome to TeX.SE! Could you perhaps try \graphicspath{{C:/Users/dawid/Documents/figures}}, i.e. slashes instead of \ ? – marmot Sep 19 '18 at 19:12
  • I did just that, still can't view the pdf. – Daphne Sep 19 '18 at 19:16
  • A side note, there is no need for Figure 1. inside the caption. Can you provide a minimal working example (MWE) ? – BambOo Sep 19 '18 at 19:20
  • @BambOo should be better now. – Daphne Sep 19 '18 at 19:29
  • @Daphne, not really. please merge your code snippets into one complete document, which we can copy in our computers and test as it is. – Zarko Sep 19 '18 at 19:44

Your Answer

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

Browse other questions tagged or ask your own question.