On Thu, Dec 23, 2010 at 15:52, Hans Hagen wrote:
>
> cleaner:
>
> function draw_table(unicode_start,n_columns)
>    context.start()
>    context.definedfont { "Serif at 20pt" }
>    context.starttabulate { string.format("*{%s}{|w(1.5em)}|",n_columns+1) }

Great, thanks! (I wanted to create a proper table at some point, but
didn't take time to think about how to create an arbitrary number of
columns.)

But then I have another question: how can I use \HL and \VL? The
following code doesn't create any line at all:

function draw_table(unicode_start,n_columns)
        context.bgroup()
        context.definedfont { "Serif at 20pt" }
        context.starttable { string.format("*{%s}{|w(1.2em)}|", n_columns) }

        for i=0,0xF do
                context.VL()

                for j=0,n_columns-1 do
                        context(unicode.utf8.char(unicode_start+i+16*j))
                        context.VL()
                end
                context.NR()
                context.HL()
        end
        context.stoptable()
        context.egroup()
end

Mojca

PS: I still don't know the reason why my example fails, but I will
ignore that for a moment since this does the job as well.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 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