Sebastian Rooks wrote:
The Wizard wrote:

All -
   I have a simple table which looks like this:


skipped some code

I would like to add a background color to the first row only.

Try this minimal example (tested on live.contextgarden.net):

\starttext
\setupcolors[state=start]
\placetable[here]{none}
\starttable[|c w(3.0cm)|c|c w(2.75cm)|c w(7.0cm)|]
\HL
\CL[green]\AR
\VL \bf Name \VL \bf Location \VL \bf Date \VL \bf Signature \VL \AR
\HL
\VL
\VL
\VL
\VL
\VL
\AR
\HL
\stoptable
\stoptext

I have only just started using ConTeXT, never used TeX or LaTeX before,
so I'm still trying to understand everything I read in the manuals, and
searching the list archive. I can not seem to make the more HTML-ish
tables work the way I want (e.g, \bTABLE...\eTABLE) so I'd like to be
able to get where I want to go using the table I have.

The "same" \bTABLE ... \eTABLE construct could look like the one below (+ the formatting that you want for the remaining rows). However, you get visually different results, mostly different offsets (worse in \bTABLE than in \starttable, but \bTABLE has many other advantages). Width in \bTABLE ... \eTABLE is physical width, I suspect that in \starttable ... \stoptable it stands for the paragraph width, so that the table below is also much narrower.

% row 1
\setupTABLE[r][1][style=bold,background=color,backgroundcolor=green,align=middle]
\setupTABLE[c][1][width=3cm] % column 1
\setupTABLE[c][3][width=2.75cm] % column 3
\setupTABLE[c][4][width=7cm]
\bTABLE
\bTR
        \bTD Name \eTD
        \bTD Location \eTD
        \bTD Date \eTD
        \bTD Signature \eTD
\eTR
\bTR
        \bTD\strut \eTD
        \bTD \eTD
        \bTD \eTD
        \bTD \eTD
\eTR
\eTABLE
\stoptext

Mojca
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to