[luatex] \openin and files without extensions

Ulrike Fischer luatex at nililand.de
Wed May 1 18:50:01 CEST 2013


In february there was a discussion about how \input handles files
without extension
(http://tug.org/mailman/htdig/luatex/2013-February/004042.html).

The problem popped up again in a tex.sx question today
http://tex.stackexchange.com/questions/111747/error-with-lualatex-lstinputlisting-and-an-extension-less-file

So I tried to identify the source of the problem.

When using \input{foo} LaTeX checks for the existence of a file with
\openin and \ifeof and this test fails for files without extension.
On the other side the primitive \input foo works without problem. 


\openin0 makefile % makefile exist in the folder
  \ifeof0         % gives: don't exist  
   don't exist
  \else
   exist
  \fi
\closein0

\openin0 {makefile} %with braces
  \ifeof0        % gives: exist
   don't exist
  \else
   exist
  \fi
\closein0

\input makefile %works

\openin0 test-1 % test-1.tex exists
  \ifeof0       % gives: exist
   don't exist
  \else
   exist
  \fi
\closein0

\input test-1   %works
\bye


I tested with
LuaTeX, Version beta-0.70.2-2012080612 (TeX Live 2012/W32TeX)
and Version beta-0.77.0-2013041621 (rev 4633) (Context)

Is this behaviour of \openin a bug or intended?



-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



More information about the luatex mailing list