ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: table background color in first row
Date: Thu, 11 Nov 2010 20:58:24 +0100	[thread overview]
Message-ID: <501D7DAE-90D7-4D42-B554-DD6C6A915DEF@gmail.com> (raw)
In-Reply-To: <20101111204055.275acdf5@arcor.com>


Am 11.11.2010 um 20:40 schrieb Manfred Lotz:

> Thanks for your example which works fine but raises some more questions:
> 
> 1. Your example creates borders around each cell which I don't want to
> have. Any way to get rid of them?

You can disable the border rules with „frame=off“.

> 2. It seems to me that \setupTABLE creates a shading for the header for 
> all tables in a document?! That is ok. 
> 
> However, I'd like to know what would be the variant to have it only for
> a single table?

\startsetups table:mystyle

  \setupTABLE            [frame=off]
  \setupTABLE[row][first][style=bold,background=color,backgroundcolor=gray]

\stopsetups

\bTABLE[setups=table:mystyle]
  \bTR
    \bTD Colheader 1 \eTD
    \bTD Colheader 2 \eTD
  \eTR
  \bTR
    \bTD cell 11 \eTD
    \bTD cell 11 \eTD
  \eTR
  \bTR
    \bTD cell 11 \eTD
    \bTD cell 11 \eTD
  \eTR
\eTABLE

or

\bTABLE[frame=off]
  \bTR[background=color,backgroundcolor=gray]
    \bTH Colheader 1 \eTH
    \bTH Colheader 2 \eTH
  \eTR
  \bTR
    \bTD cell 11 \eTD
    \bTD cell 11 \eTD
  \eTR
  \bTR
    \bTD cell 11 \eTD
    \bTD cell 11 \eTD
  \eTR
\eTABLE

> 3. How does this \bTABLE stuff compare to the \starttable stuff? Are
> these just different methods to create tables which are both in use
> these days in context or is one method to be preferred over the other? 

Both are different method to write a table, \starttable/\stoptable is
older than \bTABLE/\eTABLE which use \framed for each table cell and
allows more fancy layouts but is slower than \starttable.

Wolfgang

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


  parent reply	other threads:[~2010-11-11 19:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-11 18:44 Manfred Lotz
2010-11-11 19:13 ` Wolfgang Schuster
2010-11-11 19:40   ` Manfred Lotz
2010-11-11 19:56     ` Herbert Voss
2010-11-11 20:01       ` Manfred Lotz
2010-11-11 20:19         ` Manfred Lotz
2010-11-11 20:21         ` Wolfgang Schuster
2010-11-11 19:58     ` Wolfgang Schuster [this message]
2010-11-11 20:24       ` Manfred Lotz
2010-11-11 19:42   ` Herbert Voss
2010-11-11 19:45     ` Manfred Lotz
2010-11-11 19:45     ` Hans Hagen
2010-11-11 19:53       ` Herbert Voss
2010-11-11 21:54 ` Aditya Mahajan
2010-11-12 18:19   ` Hans Hagen
2010-11-12 18:24     ` Hans Hagen
2010-11-12 19:13     ` Wolfgang Schuster
2010-11-12 21:41       ` Aditya Mahajan
2010-11-13  5:47         ` Wolfgang Schuster
2010-11-12 21:38     ` Aditya Mahajan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=501D7DAE-90D7-4D42-B554-DD6C6A915DEF@gmail.com \
    --to=schuster.wolfgang@googlemail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).