Pablo Rodriguez
10. April 2016 um 00:00
Dear list,

I have the following document:

\mainlanguage[es]
\starttext
\startTEXpage[offset=1em]
\dorecurse{27}%
{\def\abcd{\convertnumber{a}{\recurselevel}}%
\dorecurse{27}%
{\abcd\convertnumber{a}{\recurselevel} }\par}
\stopTEXpage
\stoptext

I want to test all lowercase-letter pairs in Spanish.

Excuse me for my missing programming notions. For the sample above, I
would need a command that behaves as a variable when defined, but as a
constant when invoked.

Is there any way to achieve that without using counters? Sorry if there
is too much nonsense in the previous paragraph. But I need to know how
to do it for another example too.
You can use Lua to create a list of all character combinations. The convert function
takes three argument, the first is the conversion method, the second the conversion
value and the third the language (optional and only used by certain conversion methods).


\starttext

\startluacode
for i = 1,27 do
    for j = 1,27 do
        context(converters.convert("a",i,"es"))
        context(converters.convert("a",j,"es"))
        context.par()
    end
end
\stopluacode

\stoptext

Wolfgang