### Re: [NTG-context] running lua in metafun and in ConTeXt

Dear Hans, Thank you for your new code. Frankly speaking, it is hard to follow your code right now because of my little knowledge about these matter. I need some time to understand your code fully, especially lmtx. I’ll do more exercises using your code. Thank you for your concern. Best

### Re: [NTG-context] running lua in metafun and in ConTeXt

Hi Dal, Thank you for your nice code. lua.MP.Whatever is something! just keep in mind that lua.MP is the user namespace and lua.mp (lowercase) the system one btw, as you're doing math in mp, in lmtx (which has some extra metafun features) we have some more math functions available:

### Re: [NTG-context] running lua in metafun and in ConTeXt

Dear Hans, Thank you for your nice code. lua.MP.Whatever is something! Have a nice weekend. Best regards, Dalyoung > 2020. 4. 12. 오전 2:08, Hans Hagen 작성: > > On 4/11/2020 4:15 PM, Jeong Dal wrote: >> Dear all, >> The problem is solved by using the namespace of lua as below: >> I am not sure

### Re: [NTG-context] running lua in metafun and in ConTeXt

On 4/11/2020 4:15 PM, Jeong Dal wrote: Dear all, The problem is solved by using the namespace of lua as below: I am not sure what I did is the right way. If it is not the right way, please let me know. Thanks for reading. Best regards, Dalyoung \startluacode P={} combi = P function

### [NTG-context] running lua in metafun and in ConTeXt

Dear all, The problem is solved by using the namespace of lua as below: I am not sure what I did is the right way. If it is not the right way, please let me know. Thanks for reading. Best regards, Dalyoung \startluacode P={} combi = P function P.fact (n) if n <= 0 then return 1

### Re: [NTG-context] running lua in metafun and in ConTeXt

Hi Dalyoung, I tested your code: it works fine with both definitions of the variable tt in your code. I am using the current LMTX version 2020.04.08 14:38. Best regards: Otared > On 11 Apr 2020, at 14:32, Jeong Dal wrote: > > Dear all, > > I draw Pascal’s triangle with the label of each

### [NTG-context] running lua in metafun and in ConTeXt

Dear all, I draw Pascal’s triangle with the label of each point created by using lua functions. As you see in the code below, I defined fact(n) and combi(n,r) using lua. For the calculation tt, I used two different methods. Both are working well when I run the given code. But I got an error,