[texhax] special characters in \includegraphics arg?

Karl Berry karl at freefriends.org
Wed Aug 29 01:59:03 CEST 2007


Suppose I want to use \includegraphics to insert a file whose name
contains \ or # (among other, obviously) characters, for instance:
  \includegraphics{c:\somefile#.jpg}

All I've been able to imagine is writing a wrapper for \includegraphics
that resets the catcodes and calls the real \includegraphics.  Maybe
making use of the new filename quoting stuff in recent Web2C's, I'm not
sure.

My question is, has this already been done?  Is there some option or
package that makes it easier to use special characters in filenames?
I poked around in the FAQ and on the net, etc., to no particular avail.

I was asked specifically about \includegraphics, although obviously the
same question can arise with any macro that takes a filename argument.

Thanks,
k


More information about the texhax mailing list