Hi Wolfgang and Henri,
Thank you so much.
What is the document that allows me to find more information about context and lua ?
Fabrice

Le dim. 11 nov. 2018 à 09:57, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> a écrit :


Henri Menke schrieb am 11.11.18 um 01:25:
>
> On 11/11/18 12:33 PM, Fabrice Couvreur wrote:
>> Hi,
>> I can not complete the first line of the table with the letters of the
>> alphabet.
>> Thank you.
>> Fabrice
>>
>> \starttext
>> \startlinecorrection[blank]
>> \startmidaligned
>> \startluacode
>> context.startxtable({"align=middle, width=1.25cm"})
>>      context.startxrow()
>>      context.startxcell({"width=0.5cm"}) context("") context.stopxcell()
>>      letter = {'A','B','C','D','E','F','G','H','I','J'}
>>       for letter = 1,10 do
>>           context.startxcell() context(print(letter)) context.stopxcell()
>>       end
>      letters = {'A','B','C','D','E','F','G','H','I','J'}
>      for _,letter in ipairs(letters) do
>          context.startxcell() context(letter) context.stopxcell()
>      end

A few more alternatives (take a look at the number converter):

\setupbodyfont[dejavu]

\starttext

\startluacode

local letters = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" }

for _, letter in ipairs(letters) do
     context(letter)
end

context.par()

for _, letter in next, letters do
     context(letter)
end

context.par()

for i=1,10 do
     context(letters[i])
end

context.par()

for i=1,10 do
     context(converters.convert("A",i))
end

context.par()

for i=1,10 do
     context(converters.convert("A",i,"ru"))
end

\stopluacode

\stoptext

Wolfgang

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________