Possible Duplicate:
How to include graphics with spaces in their path?

Ok, I was creating graphs in GNUPlot and inputing them in my XeLaTeX file as I usually do, and then I realized that one of my fit lines was not showing up on one of the graphs. The middle graph was always missing the fit line, so I outputted them as .png files instead, which was actually nice because they output in color. My new problem is that when using \includegraphics in XeLaTeX, it appears that the filename is always displayed to the left of the picture, and throws off the formatting. I can't figure out how to get rid of this, and it has become kind of frustrating for me.

On top of this, I cannot have more than one graphic, as it throws an error. Here's the code for the first graphic:

\includegraphics[ width=\linewidth ]{Aluminum Data.png}

This will output my graph into the .pdf, but it is awful looking. A picture of the pdf is here:

If I try to add a second graphic, it just gets worse. It won't even complete rendering then. What I want to have is:

\includegraphics[width=\linewidth]{Aluminum Data.png}\\
\includegraphics[width=\linewidth]{Iron Data.png}\\
\includegraphics[width=\linewidth]{Lead Data.png}

Or something to that effect. Here is the console output when I try and insert more than 1 image:

ABD: EveryShipout initializing macros
! Package pgfplots Warning: running in backwards compatibility mode (unsuitable
 tick labels; missing features). Consider writing \pgfplotsset{compat=1.7} into
 your preamble.

(F:\LaTeX\tex\latex\amsfonts\umsa.fd) (F:\LaTeX\tex\latex\amsfonts\umsb.fd)

LaTeX Warning: File `Aluminum Data.png' not found on input line 111.

<use  "Aluminum Data.png" >

LaTeX Warning: File `Iron Data.png' not found on input line 112.

! Unable to load picture or PDF file '"Iron Data.png"'.
<to be read again> 
l.112 \includegraphics{Iron Data.png}


Any help would be much appreciated.

marked as duplicate by egreg, Mensch, Werner, Stefan Kottwitz Nov 26 '12 at 23:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • I just realized I didn't really explain one of the problems I'm having very well. In the linked image, you'll see that xelatex is outputting the filename into the pdf, which pushes the graph off to the side, and is kinda frustrating. Also, being able to include all 3 graphs would be awesome. – Tortilaman Nov 26 '12 at 22:17
  • 1
    It seems like your error .log shows that you're having trouble including images. Does using filenames without spaces solve the problem? – Werner Nov 26 '12 at 22:20
  • Welcome to TeX.sx! While Werner is already focusing in on the problem, this is still a lot of code. In order to make this question more widely applicable, could you please remove everything from the code that's not related to your problem and turn it into a so-called minimal working example (MWE), that people can copy and compile to reproduce your problem? Otherwise, your question might be in danger of being closed as too localized. E.g. the tables most likely have nothing to do with your graphics issue. – doncherry Nov 26 '12 at 22:22
  • @Werner: It seems that was it, I thought I had put underscores in there, but I was being careless. No idea how I didn't catch that, thank you very much. – Tortilaman Nov 26 '12 at 22:25

Browse other questions tagged or ask your own question.