Use of TEXMFVAR by LuaMetaTeX

Bruno Voisin bvoisin at icloud.com
Fri Feb 16 18:20:57 CET 2024


After a bit of digging, here's the situation.

On the Mac, the default install (using either install-tl or MacTeX) sets TEXMFVAR to ~/Library/texlive/2024/texmf-var, as specified in SELFAUTOPARENT/texmfcnf.lua.

This is a Mac-specific customization, compared with the Unix default from SELFAUTOPARENT/texmf-dist/web2c/texmfcnf.lua which is TEXMFVAR = ~/.texlive2024/texmf-var.

The problem is the following:

- LuaTeX uses the modified TEXMFVAR and puts its cache at ~/Library/texlive/2024/texmf-var/luatex-cache (~/Library being the normal location for config files, runtime data and caches on the Mac).

- LuaMetaTeX uses the unmodified TEXMFVAR and puts its cache at ~/.texlive2024/texmf-var/luametatex-cache (invisible and not easily accessed by the user on the Mac).

In other words, it's as if LuaMetaTeX ignores SELFAUTOPARENT/texmfcnf.lua. Is this a bug, or the intended behavior?

If I understood things right:

- LuaTeX uses kpathsea hence

% kpsewhich --var-value=TEXMFVAR
/Users/brunovoisin/Library/texlive/2024/texmf-var

- LuaMetaTeX does not use kpathsea and uses mtxrun.lua instead, hence

% mtxrun --var-value TEXMFVAR
home:.texlive2024/texmf-var

Running mtxrun --generate, for example, you get at the beginning

resolvers       | resolving | variable 'SELFAUTOLOC' set to '/usr/local/texlive/2024/bin/universal-darwin'
resolvers       | resolving | variable 'SELFAUTODIR' set to '/usr/local/texlive/2024/bin'
resolvers       | resolving | variable 'SELFAUTOPARENT' set to '/usr/local/texlive/2024'
resolvers       | resolving | variable 'TEXMFCNF' set to ''
resolvers       | resolving | variable 'TEXMF' set to ''
resolvers       | resolving | variable 'TEXOS' set to 'bin'
resolvers       | resolving |
resolvers       | resolving | using configuration specification 'home:texmf/web2c;selfautoparent:/texmf-local/web2c;selfautoparent:/texmf-dist/web2c;selfautoparent:/texmf/web2c'
resolvers       | resolving |
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path '/Users/brunovoisin/texmf/web2c' from specification 'home:texmf/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/local/texlive/2024/texmf-local/web2c' from specification 'selfautoparent:/texmf-local/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/local/texlive/2024/texmf-dist/web2c' from specification 'selfautoparent:/texmf-dist/web2c'
resolvers       | resolving | found regular configuration file '/usr/local/texlive/2024/texmf-dist/web2c/texmfcnf.lua'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/local/texlive/2024/texmf/web2c' from specification 'selfautoparent:/texmf/web2c'
resolvers       | resolving |
resolvers       | resolving | loading configuration file 'selfautoparent:/texmf-dist/web2c/texmfcnf.lua'

So "selfautoparent:/texmf-dist/web2c" is looked for texmfcnf.lua, but not "selfautoparent".

This seems to come from, around line 22350 of mtxrun.lua,

 resolvers.luacnfspec="home:texmf/web2c;selfautoparent:/texmf-local/web2c;selfautoparent:/texmf-context/web2c;selfautoparent:/texmf/web2c"

Is this a configuration issue, to be fixed, or is this the normal behavior of LuaMetaTeX in TeX Live?

Bruno Voisin




More information about the tex-live mailing list.