[luatex] luaotfload problems (MiKTeX/Windows 7)

Philipp Gesang Philipp.Gesang at alumni.uni-heidelberg.de
Thu Jul 4 09:50:12 CEST 2013

Hi Jura!

···<date: 2013-07-03, Wednesday>···<from: Jura Pintar>···

> Glad to be of some use!
> >This one avoids an extra call (please test):
> >
> >   local cachepaths = kpse.expand_var('$TEXMFCACHE')
> >   if cachepaths == "$TEXMFCACHE" then
> >     cachepaths = kpse.expand_var('$TEXMFVAR')
> >   end
> >   if cachepaths == "$TEXMFVAR" then
> >     cachepaths = kpse.expand_var('$VARTEXMF')
> >   end
> >
> >Thanks for bringing that to my attention; I?ve forwarded your bug
> >report to Hans.
> >
> >I think I?ll upload a fixed version to CTAN this week.
> I've tested the latest code and it's working fine. But shouldn't it
> also have
>   if cachepaths == "$VARTEXMF" then
>     cachepaths = "."
>   end
> at the end, to maintain the old behaviour, or do you think the
> precautionary behaviour should be changed?

Yes, you can add that. There will be some additional fallbacks
(system defaults like for instance /tmp) in the near future.

> >Is this normal behaviour, or a 'bug' for MikTeX installs? Or something
> >else altogether?
> >
> >As I said, things are working fine, but it puzzles me why $TEXMFCACHE is
> >being generated for each working directory where I have .tex files I'm
> >compiling with lualatex.
> There isn't supposed to be a directory *called* $TEXMFCACHE.
> $TEXMFCACHE is a kpathsea variable whose value is the path where the
> database should be created.

Exactly. When the code was moved from expand_path to expand_var,
we kept the check for the empty string, but expand_var returns
the input if it cannot expand the variables. It’s simply a bug
that doesn’t occur on systems (e.g. TL 2013) where both are

>                             But this variable is not defined under
> MiKTeX, and upon seeing that it's not defined, luaotfload is
> supposed to put the database in a folder with the path given by the
> value of the variable $TEXMFVAR (the default value in MiKTeX on Win
> 7 is C:\Users\<USERNAME>\AppData\MiKTeX\2.9 and you can test the
> value on your system by typing kpsewhich --expand-var=$TEXMFVAR in
> the Command Prompt, or by looking in the Roots panel of the MiKTeX
> settings application). The bug we've been discussing keeps
> luaotfload from doing that, which is why your database ends up where
> it does (and the problem doesn't apply to TeX Live, because the
> $TEXMFCACHE variable is defined in that setup).

Fwiw version 2.3 went up to CTAN yesterday. You can get the zip at:


(choose the tds one). This version introduces incompatible
changes so remember to delete the cache directories after


()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://tug.org/pipermail/luatex/attachments/20130704/e9bc0d99/attachment.bin>

More information about the luatex mailing list