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

Hans Hagen j.hagen at xs4all.nl
Mon Jul 29 17:39:26 CEST 2019

On 7/27/2019 11:18 PM, Reinhard Kotucha wrote:
> On 2019-07-27 at 21:49:54 +0200, Hans Hagen wrote:
>   > Keep in mind that adding a .tex in case of no suffix being
>   > there makes it impossible to open files without suffix.
> There is more to consider:  Kpathsea searches each texmf tree for a
> file without an extension and if none is found it appends '.tex' to
> the name and searches again within the same tree.

but afaik it doesn't remove a suffix first so if an engine explicitly 
adds one (we no longer do now in the openin case but pdftex does) one 
cannot open a file without suffix


\input foo      : search for 'foo' and if not found 'foo.tex'
\input foo.tex  : search for 'foo.tex'
\input foo.bar  : search for 'foo.bar' and 'foo.bar.tex' when enabled

> It does *not* search all trees for a file without extension and
> restart the search again if none is found.

so, \openin foo with tex appending to foo.tex automatically in the 
engine (not kpse) will never find 'foo'

(in luatex no suffix is appended any more in the engine now)

> This is intended behavior.  So people who need files without
> extensions should keep this in mind and be very careful.
i didn't look up the specs of the two flags in cnf so i might be wrong


                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl

More information about the luatex mailing list