ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Struggling with luatools and MacTeX
@ 2008-05-25 23:08 Jin-Hwan Cho
  2008-05-26  8:58 ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Jin-Hwan Cho @ 2008-05-25 23:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Struggling with luatools and MacTeX
  2008-05-25 23:08 Struggling with luatools and MacTeX Jin-Hwan Cho
@ 2008-05-26  8:58 ` Hans Hagen
  2008-05-26 22:00   ` Jin-Hwan Cho
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2008-05-26  8:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Struggling with luatools and MacTeX
  2008-05-26  8:58 ` Hans Hagen
@ 2008-05-26 22:00   ` Jin-Hwan Cho
  2008-05-27  7:35     ` Hans Hagen
  2008-05-27  8:21     ` Taco Hoekwater
  0 siblings, 2 replies; 10+ messages in thread
From: Jin-Hwan Cho @ 2008-05-26 22:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Struggling with luatools and MacTeX
  2008-05-26 22:00   ` Jin-Hwan Cho
@ 2008-05-27  7:35     ` Hans Hagen
  2008-05-27  8:21     ` Taco Hoekwater
  1 sibling, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2008-05-27  7:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Struggling with luatools and MacTeX
  2008-05-26 22:00   ` Jin-Hwan Cho
  2008-05-27  7:35     ` Hans Hagen
@ 2008-05-27  8:21     ` Taco Hoekwater
  2008-05-27  9:17       ` Jin-Hwan Cho
  1 sibling, 1 reply; 10+ messages in thread
From: Taco Hoekwater @ 2008-05-27  8:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users



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.

Best wishes,
Taco




___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Struggling with luatools and MacTeX
  2008-05-27  8:21     ` Taco Hoekwater
@ 2008-05-27  9:17       ` Jin-Hwan Cho
  2008-05-27  9:49         ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Jin-Hwan Cho @ 2008-05-27  9:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Struggling with luatools and MacTeX
  2008-05-27  9:17       ` Jin-Hwan Cho
@ 2008-05-27  9:49         ` Hans Hagen
  2008-05-27 14:17           ` Jin-Hwan Cho
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2008-05-27  9:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Struggling with luatools and MacTeX
  2008-05-27  9:49         ` Hans Hagen
@ 2008-05-27 14:17           ` Jin-Hwan Cho
  2008-05-27 14:23             ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Jin-Hwan Cho @ 2008-05-27 14:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Struggling with luatools and MacTeX
  2008-05-27 14:17           ` Jin-Hwan Cho
@ 2008-05-27 14:23             ` Hans Hagen
  2008-05-27 21:37               ` Jin-Hwan Cho
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2008-05-27 14:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Struggling with luatools and MacTeX
  2008-05-27 14:23             ` Hans Hagen
@ 2008-05-27 21:37               ` Jin-Hwan Cho
  0 siblings, 0 replies; 10+ messages in thread
From: Jin-Hwan Cho @ 2008-05-27 21:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-05-27 21:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-25 23:08 Struggling with luatools and MacTeX Jin-Hwan Cho
2008-05-26  8:58 ` Hans Hagen
2008-05-26 22:00   ` Jin-Hwan Cho
2008-05-27  7:35     ` Hans Hagen
2008-05-27  8:21     ` Taco Hoekwater
2008-05-27  9:17       ` Jin-Hwan Cho
2008-05-27  9:49         ` Hans Hagen
2008-05-27 14:17           ` Jin-Hwan Cho
2008-05-27 14:23             ` Hans Hagen
2008-05-27 21:37               ` Jin-Hwan Cho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).