[luatex] luaotfload problems (MiKTeX/Windows 7)
Jura Pintar
pintar at post.harvard.edu
Tue Jul 2 22:34:37 CEST 2013
Dear all,
After thinking about it a bit, I see that there are two different
problems with luaotfload on my machine.
First, it seems to hang on particular paths that might have something
weird going on with them; this isn't such a big deal, as long as we
avoid putting our working directories in odd places.
Second, and this is a bigger problem, when using MiKTeX (x64), the
location of the cache is not properly resolved (i.e. luaotfload tries
using the undefined $TEXMFCACHE, instead of trying $TEXMFVAR, and the
database ends up in the working folder). This, naturally, isn't a
problem with TeX Live, and since I have the two distributions installed
in parallel, I can confirm that everything works with it (so presumably
the problem is not due to some peculiarity of my system).
When the code
local cachepaths=kpse.expand_var('$TEXMFCACHE') or ""
if cachepaths=="" then
cachepaths=kpse.expand_var('$TEXMFVAR') or ""
end
if cachepaths=="" then
cachepaths=kpse.expand_var('$VARTEXMF') or ""
end
if cachepaths=="" then
cachepaths="."
end
in luaotfload-merged.lua and/or luaotfload-basics-gen.lua is replaced
with the legacy code
local cachepaths
if kpse.expand_var('$TEXMFCACHE')~='$TEXMFCACHE' then
cachepaths=kpse.expand_var('$TEXMFCACHE')
elseif kpse.expand_var('$TEXMFVAR')~='$TEXMFVAR' then
cachepaths=kpse.expand_var('$TEXMFVAR')
end
if not cachepaths then
cachepaths="."
end
the problem is resolved, and the database is generated and correctly
placed in the directory determined by $TEXMFVAR.
I haven't much experience at all with Lua so I'm not sure what exactly
is going on here. I get the legacy code, and why it gets us the right
result (because $TEXMFCACHE expands to $TEXMFCACHE when it is undefined
- like under MiKTeX), but I don't quite get the syntax with 'or' in the
newer code. Do people (esp. Philipp, of course) have an idea why this is
happening?
Best,
Jura
P.S. On an unrelated note, I've noticed that the compilation time with
LuaLaTeX under MiKTeX x64 (with all the latest updates) is considerably
greater than the compilation of the same files under TeX Live (more than
three times as long for some files, in fact). What might be the reason
for that?
More information about the luatex
mailing list