On Thu, Dec 23, 2010 at 2:09 PM, Peter Münster <pmli...@free.fr> wrote:
> On Thu, Dec 23 2010, Mojca Miklavec wrote:
>
>>       tex.print('\\hbox to 1.5em{\\hss %s \\hss}',
>
> tex.print() does not handle the %s.   context() does.
>
> So just replace tex.print() by context().
Right, this also works

\starttext
\startluacode
function draw_table(unicode_start,n_columns)
 for i=0,0xF do
   tex.print('\\dontleavehmode\\definedfont[Serif at 20pt]\\kern0pt')
   for j=0,n_columns do
     context('\\hbox to 1.5em{\\hss %s
\\hss}',unicode.utf8.char(unicode_start+i*16+j))
   end
   tex.print('\\crlf')
 end
end

draw_table(0x00C0,4)
\stopluacode
\stoptext


-- 
luigi
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to