TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using LyX to create my documents. I then export them to plain LaTeX and use XeLaTeX to create a PDF output. My images show up in the LyX document but not in the PDF output.

LyX generates this code to insert an image:

\includegraphics{\string"some file\string".png}

I get errors like these:

[1] <"some file".eps>
Overfull \hbox (209.98003pt too wide) in paragraph at lines 58--62


** WARNING ** No filename specified for PSfile special.
** WARNING ** Interpreting special command PSfile (ps:) failed.
** WARNING ** >> at page="3" position="(158.675, 489.198)" (in PDF)
** WARNING ** >> xxx "PSfile=""some file".eps" llx=-0 lly=-0 urx=528 ury..."
** WARNING ** >> Reading special command stopped around >>""some file".eps" llx=-0 lly=-0 urx=528 ury=178 rw...<<
share|improve this question
Try this also : \includegraphics[scale=0.1]{\string"some file\string".png} – xport Dec 29 '10 at 11:24
up vote 3 down vote accepted

Don't use spaces in the file name. xetex has to call in the background ghostscript to convert the eps file and obviously the quotes needed to hide the spaces leads to problems in this step. ""some file".eps" is simply not a sane file name.

share|improve this answer

Your path format seems to be wrong :-)

share|improve this answer
What should it be? – dv3500ea Dec 29 '10 at 11:12
Please make a trial. Remove any spaces in directory or file name. And use \includgraphics{yourfolder/yourfilename.eps} or \includgraphics{yourfolder/yourfilename.png} (depends on your file format). I am assuming you know your tex compiler can handle your picture file format. – xport Dec 29 '10 at 11:18
It works now that I've removed spaces from the file names and updated these in the tex file. – dv3500ea Dec 29 '10 at 11:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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