[NTG-pdftex] [ pdftex-Bugs-776 ] Filenames with multiple spaces are not recognized

noreply at sarovar.org noreply at sarovar.org
Tue Apr 17 23:36:59 CEST 2007


Bugs item #776, was opened at 2007-04-18 02:18
You can respond by visiting: 
http://sarovar.org/tracker/?func=detail&atid=493&aid=776&group_id=106

Category: Primitives
Group: None
Status: Open
Resolution: None
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: Nobody (None)
Date: 2007-04-18 03:06

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-18 02:50

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


More information about the ntg-pdftex mailing list