[luatex] \openin with extensionless files.

David Carlisle d.p.carlisle at gmail.com
Wed Jan 22 22:08:25 CET 2020

With a file with no extension in the same directory (say  "test") then

\input test



both work but

\openin test



do not work the same way, it only sees the file if the luatex-specific
braced form is used.

That means for example the LaTeX \IfFileExists macro reports the file
as not existing with luatex and existing with pdftex and xetex.

We could (and probably will) have a luatex-specific code branch here
to add the braces, but is this difference from pdftex  intentional? It
has been this way since at least texlive 2017, but still seems strange
and not what one would expect from the documentation

This causes some problems in end-user documents, for example


This test file:

\openin0 test

\immediate\write20{NO FILE test}
\immediate\write20{FILE test}



\immediate\write20{NO FILE test}
\immediate\write20{FILE test}



Produces the terminal output below

$ cat test

$ luatex noext
This is LuaTeX, Version 1.10.0 (TeX Live 2019)
 restricted system commands enabled.
NO FILE test
FILE test

and with pdftex

$ pdftex noext
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020)
(preloaded format=pdftex)
 restricted \write18 enabled.
entering extended mode
FILE test


More information about the luatex mailing list