ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* tables and color
@ 2010-11-17 12:39 Hans Hagen
  2010-11-17 14:31 ` Mojca Miklavec
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2010-11-17 12:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


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

* Re: tables and color
  2010-11-17 12:39 tables and color Hans Hagen
@ 2010-11-17 14:31 ` Mojca Miklavec
  2010-11-17 15:54   ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Mojca Miklavec @ 2010-11-17 14:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, Nov 17, 2010 at 13:39, Hans Hagen wrote:
>
> 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 use \starttable all over the place. The reason is that it is (or
maybe was) the only one that supported \VL (tabulate didn't support
\VL), while \bTABLE ... \eTABLE has really awfull spacing between
cells (too much vertical spacing and too little horizontal one). It
definitely depends on usage, but in many cases \starttable was the
only choice for me.

It seems weird to simply get rid of it at once and for no particular
reason. (I don't care if it doesn't support colors.)

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


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

* Re: tables and color
  2010-11-17 14:31 ` Mojca Miklavec
@ 2010-11-17 15:54   ` Hans Hagen
  0 siblings, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2010-11-17 15:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Mojca Miklavec

On 17-11-2010 3:31, Mojca Miklavec wrote:

> It seems weird to simply get rid of it at once and for no particular
> reason. (I don't care if it doesn't support colors.)

Well, it was worth a try .. I'll strip the code anyway, so no color 
support any more in that mechanism (till I need it myself).

Hans

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


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

end of thread, other threads:[~2010-11-17 15:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-17 12:39 tables and color Hans Hagen
2010-11-17 14:31 ` Mojca Miklavec
2010-11-17 15:54   ` Hans Hagen

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).