[texhax] includegraphics with spaces in the file path?

Heiko Oberdiek heiko.oberdiek at googlemail.com
Fri Sep 30 00:49:39 CEST 2011


On Thu, Sep 29, 2011 at 05:46:28PM -0400, Peter Davis wrote:

> On Thu, Sep 29, 2011 at 4:17 PM, Heiko Oberdiek <
> heiko.oberdiek at googlemail.com> wrote:
> 
> > On Thu, Sep 29, 2011 at 02:07:04PM -0400, Peter Davis wrote:
> >
> > > Just to revisit a really old subject, I switched from MiKTeX to TeXLive
> > 2011
> > > a while ago.  As I re-test this software with XeLaTeX, it seems that
> > using
> > > \includegraphics with filepaths containing spaces no longer works.  Is it
> > > possible Heiko's enhancements to grffile didn't make it into TeX Live
> > 2011?
> >
> > The space support of grffile for graphics files is based on
> > pdfTeX's \pdfximage and \pdffilesize. Both are not available in XeTeX.
> 
> Thank you, Heiko. I thought at one point you had modified grffile to include
> XeTeX support.

Yes, you are right. :-)
Since 2010/12/09 v1.13 option `space' also supports XeTeX.
Quotes are used to support the spaces.

Thus update, if your version is older.
Otherwise make a minimal example, because the space feature works
for me in TL:

% xelatex or pdflatex
\documentclass{article}
\usepackage{graphicx}
\usepackage{grffile}

\begin{document}
\includegraphics{s 1.png}
\end{document}

Yours sincerely
  Heiko Oberdiek


More information about the texhax mailing list