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

Martin Heller mr_heller at yahoo.dk
Tue Jun 10 17:08:00 CEST 2014


Zdenek Wagner wrote, on 10-06-2014 16:34:
> 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.
>

Calling pdftex from the command line should not interpret the filename 
as something to be expanded by tex.

Here is the usage instructions from pdftex --help:
------------------------------------------------------------------------------------------------------------------------
Usage: pdftex [OPTION]... [TEXNAME[.tex]] [COMMANDS]
    or: pdftex [OPTION]... \FIRST-LINE
    or: pdftex [OPTION]... &FMT ARGS
   Run pdfTeX on TEXNAME, usually creating TEXNAME.pdf.
   Any remaining COMMANDS are processed as pdfTeX input, after TEXNAME 
is read.
   If the first line of TEXNAME is %&FMT, and FMT is an existing .fmt file,
   use it.  Else use `NAME.fmt', where NAME is the program invocation name,
   most commonly `pdftex'.

   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.

   If no arguments or options are specified, prompt for input.
------------------------------------------------------------------------------------------------------------------------

As I read the above instructions, calling pdfTeX with a single 
non-option argument which is a valid full path to TEXNAME.tex should 
process the file. Only if the file is not there *and* the argument 
begins with a backslash, should the first non-option argument be 
interpreted as a line of TeX input.








More information about the tex-live mailing list