\input and \file_if_exist:nTF search diffrent paths in texlive-lualatex.

King Bunyip henrylinto at gmail.com
Sun Mar 20 02:22:35 CET 2022


Hi all,

I noticed recently that the primitive \input is able to use files in
the -output-dir that \file_if_exist:nTF thinks doesn't exist when
using texlive lualatex.

Strangely this is only for lualatex, and not pdflatex/xelatex/platex/etc

I have started a github issue over at the latex3 github:
https://github.com/latex3/latex3/issues/1070

In the discussion there I was told that ` kpse.find_file ' is able to
find the file under miktex but not texlive, and that I should come
report it over here ;p

Thanks -- Skipp1


For a minimum working example: if we have the folder structure:

-------------------------------------------------\
jobdir/
   | - a.tex
   | - outdir/
        | - b.tex
-------------------------------------------------/
Where the files:

a.tex
-------------------------------------------------\
\documentclass{article}
\usepackage{expl3}
\begin{document}

\input{b.tex}

\ExplSyntaxOn
\file_if_exist:nTF { b.tex } {
	b.tex ~ exists
} {
	b.tex ~ does ~ not ~ exist
}
\ExplSyntaxOff

\end{document}
-------------------------------------------------/

b.tex
-------------------------------------------------\
I am the contents of b.tex
-------------------------------------------------/

And the command:
-------------------------------------------------\
$ cd jobdir/
$ lualatex -output-dir=outdir a.tex
-------------------------------------------------/

Under lualatex this will produce a pdf containing
-------------------------------------------------\
b.tex does not exist
-------------------------------------------------/

However, under pdflatex,xelatex,platex,etc  this will produce a pdf containing
-------------------------------------------------\
I am the contents of b.tex
b.tex does exist
-------------------------------------------------/

All of this was done using the opensuse provided texlive:

pdfTeX, Version 3.141592653-2.6-1.40.22
LuaHBTeX, Version 1.13.2
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2021-02-18>


More information about the tex-live mailing list.