[tex-live] Passing a valid Windows path and file name to *TeX in TeXlive

Zdenek Wagner zdenek.wagner at gmail.com
Tue Jun 10 16:34:27 CEST 2014

First, \input in LaTeX calls \@input which is stored plain \input. It
allows macro expansion, so \ and ~ (because it is active) invoke expansion.
Second, windows have short 8.3 names depending on your file system and the
way how you call your programs, this is not a problem in pdftex but in
Windows. It is safer to "cd" to the directory of your file and then call it
without the path.

2014-06-10 9:20 GMT+02:00 Martin Heller <mr_heller at yahoo.dk>:

> I am working on a windows system using TeXlive 2013
>     pdflatex -version
>     pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013/W32TeX)
>     kpathsea version 6.1.1
>     Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
>     There is NO warranty.  Redistribution of this software is
>     covered by the terms of both the pdfTeX copyright and
>     the Lesser GNU General Public License.
>     For more information about these matters, see the file
>     named COPYING and the pdfTeX source.
>     Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh
> (pdfTeX).
>     Compiled with libpng 1.5.16; using libpng 1.5.16
>     Compiled with zlib 1.2.7; using zlib 1.2.7
>     Compiled with xpdf version 3.03
> pdftex can be invoked in different ways. In particular, from `pdftex
> --help` I expected pdftex to first look if the provided non-option argument
> is a file and process the file if it exists. Subsequently, the alternative
> possibilities should be tried:
>     Alternatively, if the first non-option argument begins with a
> backslash,
>     interpret all non-option arguments as a line of pdfTeX input.
>     Alternatively, if the first non-option argument begins with a &, the
>     next word is taken as the FMT to read, overriding all else. Any
>     remaining arguments are processed as above.
> Hovever, providing a valid full path to a tex file fails on Windows in
> many cases. Given that the file
> "c:\Documents and Settings\test.tex" exists, the following works as
> expected
>     pdflatex "c:\Documents and Settings\test.tex"
> Using the 8.3 path name fails (pdftex tries to interpret the path as a
> line of pdfTeX input = alternative 1)
>     pdflatex c:\Docume~1\test.tex
>     ! I can't find file `c:/Docume'.
>     <to be read again>
>                        \protect
>     <*> c:/Docume~
>                   1/test.tex
>     (Press Enter to retry, or Control-Z to exit)
>     Please type another input file name:
> Escaping the tilde by \string and changing \ to / makes the 8.3 path work
> (but this should look for a file with the full path
> "c:\Docume\string~1\test.tex").
>     pdflatex c:/Docume\string~1/test.tex
> Why is pdflatex interpreting the line in the first place? Non-option
> arguments should only be interpreted if they begin with a backslash?
> If I invoke pdflatex using
>     pdflatex "\\?\c:\Documents and Settings\test.tex"
> it also fails because it interprets the argument as TeX input. However,
> the path is valid and should not be interpreted as a line of TeX input but
> rather be processed as a file?
> Is the above expected behavior? If yes, I think the wording in the help
> text is misleading or at least it confuses me.

Zdeněk Wagner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex-live/attachments/20140610/3b7927d4/attachment.html>

More information about the tex-live mailing list