On 11-11-2010 10:54, Aditya Mahajan wrote:
This is mainly for completeness:

On Thu, 11 Nov 2010, Manfred Lotz wrote:

and like to have a light gray background for the heading row.

\starttext

\starttable[|l|l|]
\BL[2] \SR
% or
% \CL[gray] \SR
\NC \bf Colheader 1 \NC \bf Colheader 2 \NC \SR \HL
\NC cell 11 \NC cell 12 \NC \FR
\NC cell 11 \NC cell 12 \NC \LR
\stoptable

\stoptext

Both \BL and \CL work with MkII but in MkIV \BL gives a black rule
(rather than gray), which \CL gives an error. Hans, any ideas?

For a simple table, you can also use

\startTABLE
\NC .... \NC ... \NC \NR
\NC .... \NC ... \NC \NR
\stopTABLE

which is wrapper around \bTABLE .. \eTABLE.

The color handling in the old table module is implemented by overloading TaBlE code and quite a hack. In mkiv it's easy to add color support but then I'd rather remove some of the old commands. In tabulate one can do (experimental so not enabled by default):

\ctxlua{nodes.tasks.enableaction("shipouts","nodes.handlers.backgrounds")}

\starttabulate[||p||]
\NC test \NC test \NC test \NC \NR
\NC test \NC[green] \input tufte  \NC[yellow] test \NC \NR
\NC test \NC test \NC test \NC \NR
\NC test \NC test \NC test \NC \NR
\NC test \NC test \NC test \NC \NR
\NC test \NC test \NC test \NC \NR
\NC[blue] test \NC[red] test \NC test \NC \NR
\NC test \NC test \NC test \NC \NR
\NC test \NC test \NC test \NC \NR
\NC test \NC test \NC test \NC \NR
\NC test \NC test \NC[gray] test \NC \NR
\NC test \NC test \NC test \NC \NR
\NC test \NC test \NC test \NC \NR
\NC[blue] test \NC test \NC test \NC \NR
\NC test \NC test \NC test \NC \NR
\NC test \NC test \NC[magenta] test \NC \NR
\NC test \NC test \NC test \NC \NR
\NC test \NC[cyan] \dorecurse{10}{\input ward }\NC test \NC \NR
\NC test \NC test \NC test \NC \NR
\NC test \NC[yellow] test \NC test \NC \NR
\stoptabulate

So, if there's interest in the \starttable .. \stoptable mechanism (i have no idea how often it is used) I can consider weeding and redoing some of that code (or just rewrite it from scratch which is probably easier).

Hans


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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