ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: tables and color
Date: Wed, 17 Nov 2010 13:39:50 +0100	[thread overview]
Message-ID: <4CE3CD16.3050405@wxs.nl> (raw)

Hi,

A while ago Herbert reported problems with color in \starttable and 
Aditya suggested to provide \VL in \starttabulate. Also, there's some 
experimental coloring code in tabulate.

So, I decided to add better color support to tabulate as well as 
vertical lines (for as far as it makes sense). Below you will see how 
the interface works. A side effect is that \NC[color] is no longer 
supported: we need 4 cases instead of one.

Concerning \starttable: I started merging the patches into the TaBlE 
code but also started wondering if we should still provide this 
mechanism in \MKIV. I'm considering making it a module, and then remove 
the color options from it as it's a kludge anyway. Using thi smechanism 
has no real advantages over tabulate or TABLE (apart maybe from speed).

I uploaded a new beta (which then will be synced with the minimals).

% my test file:

\starttext

% \setuptabulate[distance=none]

\starttabulate[|CR{red}|CC{yellow}|CM{green}|CL{blue}|]
\NC test \NC test \NC test \NC test \NC \NR
\NC test \NC test \NC test \NC test \NC \NR
\NC test \NC test \NC test \NC test \NC \NR
\NC test \NC test \NC test \NC test \NC \NR
\stoptabulate

\starttabulate[|CM{red}|CM{green}|CM{blue}|]
\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
\stoptabulate

\ruledvbox{\starttabulate[||||][before=,after=]
\NC test \CC[red]    CC \NC test \NC \NR
\NC test \CL[green]  CL \NC test \NC \NR
\NC test \CM[blue]   CM \NC test \NC \NR
\NC test \CR[yellow] CR \NC test \NC \NR
\stoptabulate}

\starttabulate[||||]
\VL test \VL[red]    CC \VL test \VL \NR
\VL test \VL[green]  CL \VL test \VL \NR
\VL test \VL[blue]   CM \VL test \VL \NR
\VL test \VL[yellow] CR \VL test \VL \NR
\stoptabulate

\starttabulate[|{10,red}|{10,green}|{10,blue}|{10,magenta}]
\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
\stoptabulate

\starttabulate[|{red}|{green}|{blue}|{magenta}]
\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
\stoptabulate

\starttabulate[*{4}{|{red}}]
\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
\stoptabulate

% \starttabulate[||p||]
% \CC[green] test \CC[red] test \CC[blue] test \NC \NR
% \NC \setlocalhsize \the\localhsize test \NC test \NC test \NC \NR
% \HL
% \NC test \CC[green] \input tufte  \CC[yellow] test \NC \NR
% \RC rc   \NC test \NC test \NC \NR
% \NC qqqq \EQ[blue] test \NC test \NC \NR
% \NC test \NC test \NC test \NC \NR
% \NC test \NC test \NC test \NC \NR
% \CC[blue] test \CC[red] test \NC test \NC \NR
% \NC test \VL[red] test \NC test \NC \NR
% \NC test \VL test \NC test \NC \NR
% \NC test \VL test \NC test \NC \NR
% \NC test \VL test \CC[gray] test \NC \NR
% \NC test \VL test \NC test \NC \NR
% \NC test \VL test \NC test \NC \NR
% \CC[blue] test \NC test \NC test \NC \NR
% \NC test \NC test \NC test \NC \NR
% \NC test \NC test \CC[magenta] test \NC \NR
% \NC test \NC test \NC test \NC \NR
% \NC test \CC[cyan] \dorecurse{10}{\input ward }\NC test \NC \NR
% \NC test \NC test \NC test \NC \NR
% \NC test \CC[yellow] test \NC test \NC \NR
% \stoptabulate

\stoptext

-----------------------------------------------------------------
                                           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	other threads:[~2010-11-17 12:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-17 12:39 Hans Hagen [this message]
2010-11-17 14:31 ` Mojca Miklavec
2010-11-17 15:54   ` Hans Hagen

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=4CE3CD16.3050405@wxs.nl \
    --to=pragma@wxs.nl \
    --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).