\pdffilesize and spaces
Reinhard Kotucha
reinhard.kotucha at web.de
Sun Oct 20 01:56:33 CEST 2019
On 2019-10-18 at 15:26:24 -0600, Karl Berry wrote:
> I think there is no way to use \pdffilesize etc. on arbitrary
> filenames. Maybe they can be made to work with one space, but 2+
> consecutive spaces in the input will get transmuted into one by
> TeX's scanner before the primitive over sees it, if I understand
> correctly. Catcode 9 characters will likewise disappear, etc., etc.
I can at least confirm that pdftex primitives like \pdfximage
circumvent TeX's scanner and allow an arbitrary number of consecutive
spaces in filenames. The argument must be surrounded by braces.
This is different from TeX, which assumes that a filename ends with a
space. I don't know whether all catcodes are considered but macros
are expanded:
\pdfximage {\dir/\file}
If catcode 9 makes particular characters inaccessible, pdftex
primitives should be called from a macro which restores the original
catcodes. Admittedly, I've never seen anything in the TeX world which
makes use of catcode 9.
IMO the fact that pdftex primitives do not collapse an arbitrary
number of spaces into one is a great step forward. It's much more
difficult to deal with \input, \openin, and \openout.
Regards,
Reinhard
--
------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:reinhard.kotucha at web.de
------------------------------------------------------------------
More information about the tex-live
mailing list