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

Hans Hagen j.hagen at xs4all.nl
Mon Jul 29 18:33:52 CEST 2019


On 7/29/2019 6:19 PM, Harald Hanche-Olsen wrote:
> From: Hans Hagen (mailto:j.hagen at xs4all.nl)
> Date: 29 July 2019 at 17:40:22
> 
>> 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
> 
> Perhaps pdftex did so in the past, but it doesn't now,
> unless I misunderstand what you're saying:
> 
> ⬥ cat bar.tex
> \newread\foo
> \openin\foo=foo
> \ifeof\foo
>    \message{No foo!}
> \else
>    \read\foo to \bar
>    \bar
> \fi
> \end
> ⬥ cat foo
> \message{This is foo (no extension)}
> ⬥ pdftex bar
> This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdftex)
>   restricted \write18 enabled.
> entering extended mode
> (./bar.tex This is foo (no extension) )
> No pages of output.
> Transcript written on bar.log.
maybe it changed then as

https://www.tug.org/svn/texlive/trunk/Build/source/texk/web2c/pdftexdir/pdftex.web?view=markup

shows in line 32270

if cur_ext="" then cur_ext:=".tex";

(i'm not sure if that's the right source)

for \openin ... anyhow, i don't use pdftex now so i'm not going to 
investigate what really happens deep down (it would be kin dof weird if 
that code is still there and the suffix is ignored)

Hans

-----------------------------------------------------------------
                                           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