ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Newbie question: background color in single table row
@ 2005-09-19 22:41 The Wizard
  2005-09-20  0:54 ` Sebastian Rooks
  0 siblings, 1 reply; 4+ messages in thread
From: The Wizard @ 2005-09-19 22:41 UTC (permalink / raw)


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

\placetable[here]{none}
\starttable[|c w(3.0cm)|c|c w(2.75cm)|c w(7.0cm)|]
\HL
\VL \bf Name \VL \bf Location \VL \bf Date \VL \bf Signature \VL \AR
\HL
\VL 
\VL  
\VL  
\VL  
\VL
\AR
\HL
\stoptable

I would like to add a background color to the first row only. I tried
\CL[colorname], \BR[colorname] and neither gets quite what I want. Is
there a simple way to set the background color for only the first row?

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.

-- 
Mark Almeida                             mark.almeida@sun.com
Solutions Architect                      (707)398-9524/x81132
Sun Client Solutions                     (707)429-0341 Home Office
                                         (707)480-5038 Cell

Powered by Solaris 10_x86/Evolution 1.4.6

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Newbie question: background color in single table row
  2005-09-19 22:41 Newbie question: background color in single table row The Wizard
@ 2005-09-20  0:54 ` Sebastian Rooks
  2005-09-20  3:05   ` The Wizard
  2005-09-20 23:10   ` Mojca Miklavec
  0 siblings, 2 replies; 4+ messages in thread
From: Sebastian Rooks @ 2005-09-20  0:54 UTC (permalink / raw)


Welcome !

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.
> 
You missed the wiki:
   http://wiki.contextgarden.net

and in particular Guiseppe Bilotta contribution on TaBlE, less than one 
day old :-) :
   http://wiki.contextgarden.net/Table

Happy ConTeXting,

   SeR

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Newbie question: background color in single table row
  2005-09-20  0:54 ` Sebastian Rooks
@ 2005-09-20  3:05   ` The Wizard
  2005-09-20 23:10   ` Mojca Miklavec
  1 sibling, 0 replies; 4+ messages in thread
From: The Wizard @ 2005-09-20  3:05 UTC (permalink / raw)
  Cc: mailing list for ConTeXt users

On Mon, 2005-09-19 at 17:54, Sebastian Rooks wrote:
> Welcome !
> 
> 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.
> > 
> You missed the wiki:
>    http://wiki.contextgarden.net
> 
> and in particular Guiseppe Bilotta contribution on TaBlE, less than one 
> day old :-) :
>    http://wiki.contextgarden.net/Table
> 
> Happy ConTeXting,
> 
>    SeR

Sebastian -
   Thank you so much, that is exactly what I wanted. I am way behind
the curve, trying to learn, and I have looked at the Wiki but I didn't
see the new section. I will look at it. Thanks again.

-- 
Mark Almeida                             mark.almeida@sun.com
Solutions Architect                      (707)398-9524/x81132
Sun Client Solutions                     (707)429-0341 Home Office
                                         (707)480-5038 Cell

Powered by Solaris 10_x86/Evolution 1.4.6

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Newbie question: background color in single table row
  2005-09-20  0:54 ` Sebastian Rooks
  2005-09-20  3:05   ` The Wizard
@ 2005-09-20 23:10   ` Mojca Miklavec
  1 sibling, 0 replies; 4+ messages in thread
From: Mojca Miklavec @ 2005-09-20 23:10 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-09-20 23:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-19 22:41 Newbie question: background color in single table row The Wizard
2005-09-20  0:54 ` Sebastian Rooks
2005-09-20  3:05   ` The Wizard
2005-09-20 23:10   ` Mojca Miklavec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).