[ pdftex-Bugs-776 ] Filenames with multiple spaces are not recognized
Bugs item #776, was opened at 2007-04-17 22:48 You can respond by visiting: http://sarovar.org/tracker/?func=detail&atid=493&aid=776&group_id=106 Category: Primitives
Group: v1.40.0 Status: Closed Resolution: Wont Fix Priority: 5 Submitted By: Reinhard Kotucha (reinhard) Assigned to: Nobody (None) Summary: Filenames with multiple spaces are not recognized
Initial Comment: $ echo 'hello world\bye' > hello\ \ world.tex $ cat hello\ \ world.tex hello world\bye $ pdftex hello\ \ world.tex This is pdfTeX, Version 3.141592-1.40.3 (Web2C 7.5.6) entering extended mode ! I can't find file `"hello world.tex"'. <*> "hello world.tex" Please type another input file name: It seems that pdftex gets the correct name (with two spaces) but it is searching for something different. Regards, Reinhard ----------------------------------------------------------------------
Comment By: Martin Schröder (oneiros) Date: 2007-04-18 18:13
Message: Logged In: YES user_id=421 I agree: This is simply an undocumented misfeature. Anybody who uses space in filenames in TeX does so at this own risk, and this should be documented. I don't think the time for fixing this is justified. ---------------------------------------------------------------------- Comment By: Nobody (None) Date: 2007-04-17 23:36 Message: Logged In: NO The command line is scanned by TeX. The catcodes for the filename are determined by the format. If you want TeX to be able to deal with multiple spaces, you can do so by doing \everyjob\expandafter{\the\everyjob \catcode`\ =10\relax} \catcode`\ =12 \dump% as the last thing when generating your format file. ---------------------------------------------------------------------- Comment By: Taco Hoekwater (taco) Date: 2007-04-17 23:20 Message: Logged In: YES user_id=1608 It will handle this properly: $ pdftex hello\ \space\ world.tex The problem (of course) is that the tokenizer will fold two (or more) tokens of \catcode 10 into a single one, so you have to prevent tex from seeing two of these in-a-row. It may actually be possible to fix the case where the file is given as a single argument on the commandline, but fixing the general case is unreasonably hard (e.g. \input commands used inside macros), I do not think would be worth the effort and therefore vote for documenting the current behaviour as a known limitation. ---------------------------------------------------------------------- You can respond by visiting: http://sarovar.org/tracker/?func=detail&atid=493&aid=776&group_id=106
Many thanks to Nobody (whoever this is) and Taco. The tex file is generated by a perl script, hence it should be very easy to be fixed. BTW, I don't need \everyjob here because I don't use format files. This makes things even easier. Regards, Reinhard -- ---------------------------------------------------------------------------- Reinhard Kotucha Phone: +49-511-4592165 Marschnerstr. 25 D-30167 Hannover mailto:reinhard.kotucha@web.de ---------------------------------------------------------------------------- Microsoft isn't the answer. Microsoft is the question, and the answer is NO. ----------------------------------------------------------------------------
Reinhard Kotucha
Many thanks to Nobody (whoever this is) and Taco.
The tex file is generated by a perl script, hence it should be very easy to be fixed. BTW, I don't need \everyjob here because I don't use format files. This makes things even easier.
Well, I just noticed that I am Nobody. I realized this kind of nonsense, by the way, from trying to use XMLTeX as a format. XMLTeX turns - into an active character in order to inhibit ligatures. It turns out that as a consequence, XMLTeX as a format can't accept filenames with - signs on the command line. It is left as an exercise to the reader to figure out how the interaction of format and file name is supposed to work in the presence of -parse-first-line: it would appear to me that in this case the file name needs to get established before the format name. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum
participants (3)
-
David Kastrup
-
noreply@sarovar.org
-
Reinhard Kotucha