[luatex] Lua interpreter difference between Windows and Mac

Br. Samuel Springuel rpspringuel at gmail.com
Sat Feb 18 21:06:08 CET 2017

I'm writing a lua script which has the following code block:

   font_target = "greciliae.ttf"
   font_directory = kpse.find_file(font_target)

Given that greciliae.ttf is installed in 
$TEXMFLOCAL/fonts/truetype/public/gregoriotex, the code block works fine 
on my Mac (10.11.6) when executed by texlua (and I assume on other Unix 
flavors, though I haven't tested that yet).  However, when I test the 
same code on a Windows (10) machine, font_directory ends up being nil.

When I type `kpsewhich greciliae.ttf` at the command prompt on the 
Windows machine, I get the proper path returned, so I know that 
kpsewhich can find the file.

If I switch font_target to a "gregoriotex.sty" (which is installed in 
$TEXMFLOCAL/tex/lualatex/gregoriotex/) font_directory returns the proper 
value on both machines.  Thus I know that kpse.find_file does actually 
work, at least some of the time, on Windows.

Why isn't kpse.find_file finding fonts that kpsewhich can find on 
Windows?  Am I doing something wrong?

Both machines are running version 0.95.0 (TeXLive 2016) of texlua.
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)


More information about the luatex mailing list