[texhax] File Not Found: Importing Graphics

Reinhard Kotucha reinhard.kotucha at web.de
Tue Sep 23 21:46:26 CEST 2008


Tom Schneider writes:
 > Sam:
 > 
 > > \includegraphics[scale=1]{Graphs PNG/Color Contour SLI.png}
 > 
 > As someone else pointed out your problem may be the spaces.  Spaces
 > are used for parsing in many unix systems unless you put quote marks
 > around the name.  I don't know if that can be done in LaTeX.

Recent versions of pdftex (at least) support spaces in filenames.  The
\input primitive had been extended.  Now you can say

  \input "foo bar"

in plain tex

or

  \input{"foo bar"}

in latex.  To be more precise, \input is a primitive, not a macro.
All macros which are using this primitive will inherit the new
behavior.  Since \includegraphics is a macro which depends on \input,
I assume that you can quote spaces in filenames there too.

What probably does not work are filenames with consecutive spaces.
tex (the program) regards any number of space tokens as one space
token.  The behavior depends on the format file you are using.  It can
be changed there.

BTW, I often see that people recommend not to use spaces in
filenames.  I disagree here.  All operating systems available today
support spaces in filenames somehow.  If you are using a GUI, you'll
have to fill out a form and it is not obvious which characters are
allowed or not in the "filename" field.  

It would be more helpful if people don't care about spaces in
filenames but file a bug report if something doesn't work as expected.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			              Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------


More information about the texhax mailing list