On Fri, 12 Nov 2010, Hans Hagen wrote:
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
Can you also add vertical lines and row background colors?
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).
Personally, I do not like the \starttable ... \stoptable macros (the patchup with TaBlE macro is too convoluted) and am happy with the compact \startTABLE syntax. But then, I don't use tables too often anyways. Aditya