[tex-live] error on (after) texlive 2008 installation

Zdenek Wagner zdenek.wagner at gmail.com
Thu Apr 16 17:25:11 CEST 2009


2009/4/16 Heiko Oberdiek <oberdiek at uni-freiburg.de>:
> Hi Reinhard,
>
> On Thu, Apr 16, 2009 at 12:40:32AM +0200, Reinhard Kotucha wrote:
>
>> spaces are supported already:
>>
>> $ touch foo\ bar\ baz.tex
>> $ tex '\input "foo bar baz.tex"\bye'
>> This is TeX, Version 3.1415926 (Web2C 7.5.7)
>> (./foo bar baz.tex)
>> No pages of output.
>> Transcript written on "foo bar baz.log".
>
> How can this feature be detected at TeX macro level in a robust
> and easy way?
> What's the specification of this syntax?
>
You should distinguish 3 different cases:

1. The name of the main file contains spaces. Its treatment has
nothing to do with TeX, everything is done by the shell. The syntax
just depend on your operating system and the shell. TeX gets the whole
string in argv[1]. Create a file with at least one space in its name
with the following contents:

\tracingall
\jobname
\bye

Now run it by plain. you will see in the log that \jobname expansion
contains normal space token with category 10.

2. The file name itself does not contain spaces but it resides in the
TEXMF tree that is installed in a directory the name of which contains
spaces. Again, search algorithm is not a matter of TeX, in TL it is
implemented in kpathsea, in MiKTeX an analogous algorithm is
implemented in its internals. If a TeX implementation allows to
install the TEXMF tree into a directory with spaces, it should be able
to find the files there.

3. You wish to \input a file with spaces in its name. Lte's do a small
experiment. Create file foo.tex containing a single word foo, file
bar.tex containing a single word nothing and file foo\ bar.tex
containing a single word FOOBAR. Then make main.tex containing:

\tracingall
\def\fname{ foo bar}
\catcode`\ 12
\def\Fname{ foo bar}
\input foo bar
\catcode`\ 10

\input foo bar

\input \fname

\input \Fname

\input "foo bar"
\bye

Run it by plain and look what happens. Notice that \input expands
macros and ignores leading spaces. The file name ends at the first
space which is the character with ASCII code 32 no matter what its
category is. If I remember it well, it is section 516 in TeX the
Program. The first four commands therefore input the contents of
foo.tex followed by the word bar. You can only distinguish normal
spaces with category 10 from spaces with category 12. The use of
double quotes is an extension that allows you to input the contents of
foo\ bar.tex. This is implementation dependent and you cannot assume
that it is supported in all implementations. Remember that the same
applies to graphics inclusion as well as the LaTeX macros \usepackage,
\RequirePackage and others.

> Yours sincerely
>  Heiko <oberdiek at uni-freiburg.de>
>



-- 
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz


More information about the tex-live mailing list