![](https://secure.gravatar.com/avatar/74d41c3215dcdd377343cdc47311757c.jpg?s=120&d=mm&r=g)
18 Jul
2020
18 Jul
'20
2:22 p.m.
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) then return 1 else return (n*Binom(n-1,k-1))/k end
end
context.startxtable({"align={middle,lohi}, width=1.2cm,offset=0.8ex,bodyfont=9pt"}) for i = 1, 10 do context.startxrow({"background=color,backgroundcolor=cyan"}) for j = 1, i do context.startxcell() \ctxlua{context(Binom(i,j))}
Remove \ctxlua: context(Binom(i,j)) Wolfgang