Struggling with luatools and MacTeX
![](https://secure.gravatar.com/avatar/516973c78d7ff05105bd89fa0bc1d57d.jpg?s=120&d=mm&r=g)
For the first step to luatex, I tried to use luatools as written in Hans Hagen's MK manual. 1. Compiled a recent luatex and it was put in "/usr/texbin/luatex" and linked to "/usr/texbin/texlua". 2. Downloaded the current beta and construct my "$HOME/share/texmf- context". Of course, the line in /usr/local/texlive/2007/texmf/web2c/ texmf.cnf was changed as follows. TEXMFHOME=$HOME/share/texmf-hyperref;$HOME/share/texmf-lm;$HOME/share/ texmf-context 3. Made a new "/usr/texbin/luatools" to use luatools.lua directly. The contents of the file was #!/bin/sh export SELFAUTOLOC=/usr/local/texlive/2007/bin export SELFAUTODIR=/usr/local/texlive/2007 export SELFAUTOPARENT=/usr/local/texlive/2007 export TEXMFCACHE="$HOME/share" texlua "$HOME/share/texmf-context/scripts/context/lua/luatools.lua" "$@" 4. Finally tried "luatools --generate" and it seemed that everything went smoothly. But I found that luatools did not cache the $TEXMFHOME directories because it consisted of more than one TEXMF directories. It's not a bug but here is a patch to solve this problem. --- luatools.lua 2008-05-26 07:36:20.000000000 +0900 +++ luatools.lua.new 2008-05-26 07:59:17.000000000 +0900 @@ -3811,7 +3811,7 @@ return { } else local t = { } - for _,v in ipairs(string.splitchr(str:gsub("^\{(.+)\} $","%1"),",")) do + for _,v in ipairs(string.splitchr(str:gsub("^\{(.+)\} $","%1"):gsub(";",","),",")) do t[#t+1] = (v:gsub("^[%!]*(.+)[%/\\]*$","%1")) end return t 5. Now tried "luatools cmr10.tfm" but no anwer. However "luatools cmr10.tfm*" showed the proper answer. It seems that this problem is related to the behavior of "luatools --ini plain" which says "LuaTools | no tex file with name plain.tex". Is there something what I missed? Best regards, ChoF.
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Jin-Hwan Cho wrote:
it consisted of more than one TEXMF directories. It's not a bug but here is a patch to solve this problem.
actually the solution to that is the following patch ... the simplified expansion dates from the stepwise construction of this module function input.locatelists() local instance = input.instance for _, path in pairs(input.expanded_path_list('TEXMF')) do path = file.collapse_path(input.clean_path(path)) input.report("locating list of",path) input.locatedatabase(input.normalize_name(path)) end end you really need the latest bets (just uploaded); there has been some cleanup (esp instances) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/516973c78d7ff05105bd89fa0bc1d57d.jpg?s=120&d=mm&r=g)
On May 26, 2008, at 5:58 PM, Hans Hagen wrote:
Jin-Hwan Cho wrote:
it consisted of more than one TEXMF directories. It's not a bug but here is a patch to solve this problem.
actually the solution to that is the following patch ... the simplified expansion dates from the stepwise construction of this module
function input.locatelists() local instance = input.instance for _, path in pairs(input.expanded_path_list('TEXMF')) do path = file.collapse_path(input.clean_path(path)) input.report("locating list of",path) input.locatedatabase(input.normalize_name(path)) end end
you really need the latest bets (just uploaded); there has been some cleanup (esp instances)
luatools --generate worked well with the last beta. Thanks. Still luatools cmr10.tfm does not work. But luatools cmr10.tfm* works. Is it intended? Best, ChoF.
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Jin-Hwan Cho wrote:
On May 26, 2008, at 5:58 PM, Hans Hagen wrote:
Jin-Hwan Cho wrote:
it consisted of more than one TEXMF directories. It's not a bug but here is a patch to solve this problem. actually the solution to that is the following patch ... the simplified expansion dates from the stepwise construction of this module
function input.locatelists() local instance = input.instance for _, path in pairs(input.expanded_path_list('TEXMF')) do path = file.collapse_path(input.clean_path(path)) input.report("locating list of",path) input.locatedatabase(input.normalize_name(path)) end end
you really need the latest bets (just uploaded); there has been some cleanup (esp instances)
luatools --generate worked well with the last beta. Thanks.
Still luatools cmr10.tfm does not work. But luatools cmr10.tfm* works. Is it intended?
hm, works here
luatools cmr10.tfm c:/data/develop/tex/texmf/fonts/tfm/public/cm/cmr10.tfm
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/516973c78d7ff05105bd89fa0bc1d57d.jpg?s=120&d=mm&r=g)
On May 27, 2008, at 5:21 PM, Taco Hoekwater wrote:
Jin-Hwan Cho wrote:
Still luatools cmr10.tfm does not work. But luatools cmr10.tfm* works. Is it intended?
luatools cmr10.tfm works for me (linux). It could be a Mac thing (\r vs \n) but I have no idea how to test that.
I checked the function input.aux.find_file() in luatools.lua. In the 4309th line (for _, path in pairs(pathlist) do) the variable "path" was !!/usr/local/texlive/2007/texmf-dist when "path" indicates the texmf tree having cmr10.tfm. Here, it did not end with "//" so that the variable recurse became "false". After I changed the value of "recurse" explicitly to "true", I could get the right result. Do you know exact reason? Best regards, ChoF.
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Jin-Hwan Cho wrote:
On May 27, 2008, at 5:21 PM, Taco Hoekwater wrote:
Jin-Hwan Cho wrote:
Still luatools cmr10.tfm does not work. But luatools cmr10.tfm* works. Is it intended? luatools cmr10.tfm works for me (linux). It could be a Mac thing (\r vs \n) but I have no idea how to test that.
I checked the function input.aux.find_file() in luatools.lua.
In the 4309th line (for _, path in pairs(pathlist) do) the variable "path" was
!!/usr/local/texlive/2007/texmf-dist
when "path" indicates the texmf tree having cmr10.tfm.
Here, it did not end with "//" so that the variable recurse became "false". After I changed the value of "recurse" explicitly to "true", I could get the right result.
Do you know exact reason?
// indicates that the tree should be searched recursively ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/516973c78d7ff05105bd89fa0bc1d57d.jpg?s=120&d=mm&r=g)
On May 27, 2008, at 6:49 PM, Hans Hagen wrote:
Jin-Hwan Cho wrote:
On May 27, 2008, at 5:21 PM, Taco Hoekwater wrote:
Jin-Hwan Cho wrote:
Still luatools cmr10.tfm does not work. But luatools cmr10.tfm* works. Is it intended? luatools cmr10.tfm works for me (linux). It could be a Mac thing (\r vs \n) but I have no idea how to test that.
I checked the function input.aux.find_file() in luatools.lua.
In the 4309th line (for _, path in pairs(pathlist) do) the variable "path" was
!!/usr/local/texlive/2007/texmf-dist
when "path" indicates the texmf tree having cmr10.tfm.
Here, it did not end with "//" so that the variable recurse became "false". After I changed the value of "recurse" explicitly to "true", I could get the right result.
Do you know exact reason?
// indicates that the tree should be searched recursively
In my case, the variable "path" shows the name of the directories written in $TEXMF of texmf.cnf. Of course, every path does not end with "//". But everyone thinks that file must be searched recursively for these directories. In my opinion, the following line is non-sense. if path:find("//$") then recurse = true else recurse = false end After giving "recurse = true" explicitly, everything works fine for me. Best. ChoF.
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Jin-Hwan Cho wrote:
On May 27, 2008, at 6:49 PM, Hans Hagen wrote:
Jin-Hwan Cho wrote:
On May 27, 2008, at 5:21 PM, Taco Hoekwater wrote:
Jin-Hwan Cho wrote:
Still luatools cmr10.tfm does not work. But luatools cmr10.tfm* works. Is it intended? luatools cmr10.tfm works for me (linux). It could be a Mac thing (\r vs \n) but I have no idea how to test that. I checked the function input.aux.find_file() in luatools.lua.
In the 4309th line (for _, path in pairs(pathlist) do) the variable "path" was
!!/usr/local/texlive/2007/texmf-dist
when "path" indicates the texmf tree having cmr10.tfm.
Here, it did not end with "//" so that the variable recurse became "false". After I changed the value of "recurse" explicitly to "true", I could get the right result.
Do you know exact reason? // indicates that the tree should be searched recursively
In my case, the variable "path" shows the name of the directories written in $TEXMF of texmf.cnf. Of course, every path does not end with "//". But everyone thinks that file must be searched recursively for these directories.
In my opinion, the following line is non-sense.
if path:find("//$") then recurse = true else recurse = false end
well, the !! as well as // are kind of standard web2c / tds / whatever Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/516973c78d7ff05105bd89fa0bc1d57d.jpg?s=120&d=mm&r=g)
On May 27, 2008, at 11:23 PM, Hans Hagen wrote:
Jin-Hwan Cho wrote:
On May 27, 2008, at 6:49 PM, Hans Hagen wrote:
Jin-Hwan Cho wrote:
On May 27, 2008, at 5:21 PM, Taco Hoekwater wrote:
Jin-Hwan Cho wrote:
Still luatools cmr10.tfm does not work. But luatools cmr10.tfm* works. Is it intended? luatools cmr10.tfm works for me (linux). It could be a Mac thing (\r vs \n) but I have no idea how to test that. I checked the function input.aux.find_file() in luatools.lua.
In the 4309th line (for _, path in pairs(pathlist) do) the variable "path" was
!!/usr/local/texlive/2007/texmf-dist
when "path" indicates the texmf tree having cmr10.tfm.
Here, it did not end with "//" so that the variable recurse became "false". After I changed the value of "recurse" explicitly to "true", I could get the right result.
Do you know exact reason? // indicates that the tree should be searched recursively
In my case, the variable "path" shows the name of the directories written in $TEXMF of texmf.cnf. Of course, every path does not end with "//". But everyone thinks that file must be searched recursively for these directories.
In my opinion, the following line is non-sense.
if path:find("//$") then recurse = true else recurse = false end
well, the !! as well as // are kind of standard web2c / tds / whatever
Finally I found what caused the problem just for me. My "texmf.cnf" had the following line: TEXMFHOME=$HOME/share/texmf-hyperref;$HOME/share/texmf-context After replacing the character ";" to "," I had no problem. Thanks again, ChoF.
participants (3)
-
Hans Hagen
-
Jin-Hwan Cho
-
Taco Hoekwater