On Mon, 1 Oct 2018, Fabrice Couvreur wrote:

Hi,
Thank you Aditya for the link. I knew that with natural tables, but I hoped
it could be done with xtables too.

Almost the same code works with xtables as well (in your example, I don't know the relationship between the columns)

\starttext
\startluacode
context.startxtable({"align=middle, width=0.8cm"})
  context.startxrow()
    context.startxcell() context("$(+)$") context.stopxcell()
    for y = 1,6 do
        context.startxcell() context(y) context.stopxcell()
    end
  context.stopxrow()
  for x = 1,6 do
      context.startxrow()
      context.startxcell() context(x) context.stopxcell()
          for y = 1,6 do
            context.startxcell() context(x+y) context.stopxcell()
          end
      context.stopxrow()
  end
context.stopxtable()
\stopluacode
\stoptext

Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to