[texhax] \input command under Linux

Uwe Lueck uwe.lueck at web.de
Tue May 4 10:38:18 CEST 2010


Steve Schwartz <s.schwartz at imperial.ac.uk> wrote at 04.05.2010 02:30:30:

>On Mon, 2010-05-03 at 20:17 +0100, Uwe Lueck wrote:
>> I guess now Steve has found /the/ diagnosis.
>> 
>>     \input ...AAMacros
>> 
>> searches for a file AAMacros.tex which is nowhere.
>
> Actually, my system behaves slightly differently. The \input line:
>
> \input{AAMacros}
>
> WILL load a file AAMacros that DOESN'T have a .tex extension.

So I thought my claim is wrong and tried find the opposite in the TeXbook, 
but Chapter 6 says "but \TeX\ automatically supplies the suffix `|.tex|' 
if no suffix has been specified." On the other hand, the situation at this 
package is reading from the \TeX\ prompt, rather like this:

> But if I mistype it, for example, as:
>
> \input{ABMacros}
>
> then my latex will tell me that it couldn't find ABMacros.tex and ask me
> to give it another filename (default extension .tex). When I input
> AAMacros, it likewise says it can't find AAMacros.tex.
>
> Conclusion: If AAMacros is found within my pre-existing tex search path
> then it can be found, but when the latex engine asks me for a file name
> there doesn't appear to be a way to input it at that stage.

Ah. Indeed Chapter 20 of the TeXbook, in explaining \openin, says 
"In most installations of \TeX, the extension `|.tex|' will be appended to 
the file name, as with `|\input|', if no extension is given explicitly." 
So the behaviour really is installation-dependent. 

Thanks, 

    Uwe.


More information about the texhax mailing list