Re: [NTG-context] Problem with string.format (Lua)

2018-01-14 Thread Hans Hagen
On 1/14/2018 9:50 PM, Fabrice Couvreur wrote: Hi Hans, Your code runs perfectly, thanks. However, if I replace % with \letterpercent, my code does not run \ctxlua{print(string.format("\letterpercent g",Binomial(100,60,0.25)))} because print prints to the console Thank you Fabrice

Re: [NTG-context] Problem with string.format (Lua)

2018-01-14 Thread Fabrice Couvreur
Hi Hans, Your code runs perfectly, thanks. However, if I replace % with \letterpercent, my code does not run \ctxlua{print(string.format("\letterpercent g",Binomial(100,60,0.25)))} Thank you Fabrice 2018-01-14 13:58 GMT+01:00 Hans Hagen : > On 1/14/2018 1:13 PM, Joseph Canedo

Re: [NTG-context] Problem with string.format (Lua)

2018-01-14 Thread Hans Hagen
On 1/14/2018 1:13 PM, Joseph Canedo wrote: Hi Fabrice, string.format behaves more or less as C printf. You probably need to specify %.4g in 1st argument. Hope this helps Best Joseph *De : *Fabrice Couvreur *Envoyé le :*dimanche 14 janvier 2018 13:05 *À 

Re: [NTG-context] Problem with string.format (Lua)

2018-01-14 Thread Joseph Canedo
Hi Fabrice, string.format behaves more or less as C printf. You probably need to specify %.4g in 1st argument. Hope this helps Best Joseph De : Fabrice Couvreur Envoyé le :dimanche 14 janvier 2018 13:05 À : mailing list for ConTeXt users Objet :[NTG-context] Problem with string.format (Lua)