[luatex] \openin does not find files with no extension

Harald Hanche-Olsen harald.hanche-olsen at ntnu.no
Sat Jul 27 14:58:47 CEST 2019


Consider this code:

\newread\foobar 
\openin\foobar=test-import 
\ifeof\foobar 
\message{The file test-import does NOT exist}
\else 
\message{The file test-import DOES exist}
\fi 
\input test-import
\bye

If the file test-import (without any extension) exists
with this content:

\message{This is test-import}

the result is as follows:

⬥ luatex sxxx
This is LuaTeX, Version 1.10.0 (TeX Live 2019)
 restricted system commands enabled.
(./sxxx.tex The file test-import does NOT exist (./test-import
This is test-import))
warning  (pdf backend): no pages of output.
Transcript written on sxxx.log.

This is on a mac. I get the same result on linux.

If I rename test-import to test-import.tex, I get the expected result:

(./sxxx.tex The file test-import DOES exist (./test-import.tex
This is test-import))

Alternatively, if I replace the second line of the driver file with

\openin\foobar{test-import}

I also get the expected result.

This all seems a bit confusing to me. Bug, or feature?

– Harald



More information about the luatex mailing list