Re: [NTG-context] Code lua in a table

2020-07-18 Thread Otared Kavian
> On 18 Jul 2020, at 23:35, Otared Kavian wrote: > > > >> On 18 Jul 2020, at 22:25, Fabrice Couvreur >> wrote: >> >> Hi Wolfgang, >> >> It works but why did you ask this question since I finally use context ? >> Are you sure you want to use context(...) here? >> How not to display the .0

Re: [NTG-context] Code lua in a table

2020-07-18 Thread Otared Kavian
> On 18 Jul 2020, at 22:25, Fabrice Couvreur > wrote: > > Hi Wolfgang, > > It works but why did you ask this question since I finally use context ? > Are you sure you want to use context(...) here? > How not to display the .0 ? Besides what Wolfgang suggested, ou can also use

Re: [NTG-context] Code lua in a table

2020-07-18 Thread Wolfgang Schuster
Fabrice Couvreur schrieb am 18.07.2020 um 22:25: Hi Wolfgang, It works but why did you ask this question since I finally use context ? Are you sure you want to use context(...) here? In your first version you used the context function in the loop to print the output of the Binom but the

Re: [NTG-context] Code lua in a table

2020-07-18 Thread Fabrice Couvreur
Small correction : \starttext \startluacode function Binom(n,k) if k > n then return 0 elseif (n == 0 or k == 0) then return 1 else return (n*Binom(n-1,k-1))/k end end context.startxtable({"align={middle,lohi},

Re: [NTG-context] Code lua in a table

2020-07-18 Thread Fabrice Couvreur
Hi Wolfgang, It works but why did you ask this question since I finally use context ? > Are you sure you want to use context(...) here? > How not to display the .0 ? Fabrice Le sam. 18 juil. 2020 à 22:22, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> a écrit : > Fabrice Couvreur

Re: [NTG-context] Code lua in a table

2020-07-18 Thread Wolfgang Schuster
Fabrice Couvreur schrieb am 18.07.2020 um 22:09: Hi, I improved the code to be able to display the grid but I cannot display the coefficients. Thank you Fabrice \starttext \startluacode      function Binom(n,k)        if k > n then              return 0        elseif (n == 0 or k == 0)

Re: [NTG-context] Code lua in a table

2020-07-18 Thread Fabrice Couvreur
Hi, I improved the code to be able to display the grid but I cannot display the coefficients. Thank you Fabrice \starttext \startluacode function Binom(n,k) if k > n then return 0 elseif (n == 0 or k == 0) then return 1 else return

Re: [NTG-context] french translation of ConTeXt interface - progress (v3)

2020-07-18 Thread Hans Hagen
On 7/18/2020 8:56 PM, Garulfo wrote: > @Garulfo: Do you have a special use case in mind, or do you do this > for fun? "for fun" isn't quite right, although there's probably some truth to it. Actually, translating 6,300 keywords isn't fun, and it's even worst when you don't really master the

Re: [NTG-context] french translation of ConTeXt interface - progress (v3)

2020-07-18 Thread Garulfo
> @Garulfo: Do you have a special use case in mind, or do you do this > for fun? "for fun" isn't quite right, although there's probably some truth to it. Actually, translating 6,300 keywords isn't fun, and it's even worst when you don't really master the material behind... The point is that I

Re: [NTG-context] Code lua in a table

2020-07-18 Thread Wolfgang Schuster
Fabrice Couvreur schrieb am 18.07.2020 um 20:05: Hello, I want to display the values of Pascal's triangle in a table. Unfortunately my knowledge of Lua is not sufficient to run this code. Thank you. Fabrice \starttext \startluacode      function Binom(n,k)      if k > n then              

[NTG-context] Code lua in a table

2020-07-18 Thread Fabrice Couvreur
Hello, I want to display the values of Pascal's triangle in a table. Unfortunately my knowledge of Lua is not sufficient to run this code. Thank you. Fabrice \starttext \startluacode function Binom(n,k) if k > n then return 0 elseif (n == 0 or k == 0) then