* xtables: rowwise, columnwise, and cellwise operations
@ 2018-01-05 3:57 Henri
2018-01-05 13:32 ` Hans Hagen
0 siblings, 1 reply; 4+ messages in thread
From: Henri @ 2018-01-05 3:57 UTC (permalink / raw)
To: mailing list for ConTeXt users
Dear list,
The Natural Tables have this great feature that I can control the layout with rowwise, columnwise,
or cellwise setups. For example:
\starttext
\setupTABLE [frame=off]
\setupTABLE [r] [first] [topframe=on,bottomframe=on,style=bold]
\setupTABLE [c] [2] [style=italic]
\setupTABLE [2] [3] [color=red]
\setupTABLE [r] [last] [bottomframe=on]
\startTABLE
\NC A \NC A \NC A \NC\NR
\NC B \NC B \NC B \NC\NR
\NC C \NC C \NC C \NC\NR
\NC D \NC D \NC D \NC\NR
\NC E \NC E \NC E \NC\NR
\stopTABLE
\stoptext
How can I do such a thing with Extreme Tables? If it is not yet possible I'd like to request the
inclusion of such a mechanism.
Cheers, Henri
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: xtables: rowwise, columnwise, and cellwise operations
2018-01-05 3:57 xtables: rowwise, columnwise, and cellwise operations Henri
@ 2018-01-05 13:32 ` Hans Hagen
2018-01-05 16:12 ` Floris van Manen
0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2018-01-05 13:32 UTC (permalink / raw)
To: ntg-context
On 1/5/2018 4:57 AM, Henri wrote:
> Dear list,
>
> The Natural Tables have this great feature that I can control the layout with rowwise, columnwise,
> or cellwise setups. For example:
>
> \starttext
>
> \setupTABLE [frame=off]
> \setupTABLE [r] [first] [topframe=on,bottomframe=on,style=bold]
> \setupTABLE [c] [2] [style=italic]
> \setupTABLE [2] [3] [color=red]
> \setupTABLE [r] [last] [bottomframe=on]
> \startTABLE
> \NC A \NC A \NC A \NC\NR
> \NC B \NC B \NC B \NC\NR
> \NC C \NC C \NC C \NC\NR
> \NC D \NC D \NC D \NC\NR
> \NC E \NC E \NC E \NC\NR
> \stopTABLE
>
> \stoptext
it's also an extremely inefficient method
> How can I do such a thing with Extreme Tables? If it is not yet possible I'd like to request the
> inclusion of such a mechanism.
from the manual, named setups:
\setupxtable[suffix][align=middle,foregroundcolor=red]
\setupxtable[blabla][foregroundstyle=slanted]
\setupxtable[crap] [foregroundcolor=blue]
\setupxtable[bold] [crap][foregroundstyle=bold]
\startxtable % [frame=off]
\startxtablehead
\startxrow[bold]
\startxcell[suffix] head a \stopxcell
\startxcell[blabla] head b \stopxcell
\startxcell head c \stopxcell
\stopxrow
\stopxtablehead
\startxtablebody
\startxrow
\startxcell[suffix][ny=2] cell a 1 \stopxcell
\startxcell cell b 1 \stopxcell
\startxcell cell c 1 \stopxcell
\stopxrow
\startxrow
\startxcell cell b 2 \stopxcell
\startxcell cell c 2 \stopxcell
\stopxrow
\startxrow
\startxcell[suffix] cell a 3 \stopxcell
\startxcell cell b 3 \stopxcell
\startxcell cell c 3 \stopxcell
\stopxrow
\startxrow
\startxcell[suffix] cell a 4 \stopxcell
\startxcell cell b 4 \stopxcell
\startxcell cell c 4 \stopxcell
\stopxrow
\startxrow
\startxcell[suffix] cell a 5 \stopxcell
\startxcell cell b 5 \stopxcell
\startxcell cell c 5 \stopxcell
\stopxrow
\stopxtablebody
\stopxtable
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: xtables: rowwise, columnwise, and cellwise operations
2018-01-05 13:32 ` Hans Hagen
@ 2018-01-05 16:12 ` Floris van Manen
2018-01-05 21:49 ` Alan Braslau
0 siblings, 1 reply; 4+ messages in thread
From: Floris van Manen @ 2018-01-05 16:12 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 3564 bytes --]
apparently
> \startxcell[suffix][ny=2] cell a 1 \stopxcell
should be
\startxcell[suffix, ny=2] cell a 1 \stopxcell
> On 5 Jan 2018, at 14:32, Hans Hagen <pragma@wxs.nl> wrote:
>
> On 1/5/2018 4:57 AM, Henri wrote:
>> Dear list,
>> The Natural Tables have this great feature that I can control the layout with rowwise, columnwise,
>> or cellwise setups. For example:
>> \starttext
>> \setupTABLE [frame=off]
>> \setupTABLE [r] [first] [topframe=on,bottomframe=on,style=bold]
>> \setupTABLE [c] [2] [style=italic]
>> \setupTABLE [2] [3] [color=red]
>> \setupTABLE [r] [last] [bottomframe=on]
>> \startTABLE
>> \NC A \NC A \NC A \NC\NR
>> \NC B \NC B \NC B \NC\NR
>> \NC C \NC C \NC C \NC\NR
>> \NC D \NC D \NC D \NC\NR
>> \NC E \NC E \NC E \NC\NR
>> \stopTABLE
>> \stoptext
>
> it's also an extremely inefficient method
>
>> How can I do such a thing with Extreme Tables? If it is not yet possible I'd like to request the
>> inclusion of such a mechanism.
> from the manual, named setups:
>
> \setupxtable[suffix][align=middle,foregroundcolor=red]
> \setupxtable[blabla][foregroundstyle=slanted]
> \setupxtable[crap] [foregroundcolor=blue]
> \setupxtable[bold] [crap][foregroundstyle=bold]
>
> \startxtable % [frame=off]
> \startxtablehead
> \startxrow[bold]
> \startxcell[suffix] head a \stopxcell
> \startxcell[blabla] head b \stopxcell
> \startxcell head c \stopxcell
> \stopxrow
> \stopxtablehead
> \startxtablebody
> \startxrow
> \startxcell[suffix][ny=2] cell a 1 \stopxcell
> \startxcell cell b 1 \stopxcell
> \startxcell cell c 1 \stopxcell
> \stopxrow
> \startxrow
> \startxcell cell b 2 \stopxcell
> \startxcell cell c 2 \stopxcell
> \stopxrow
> \startxrow
> \startxcell[suffix] cell a 3 \stopxcell
> \startxcell cell b 3 \stopxcell
> \startxcell cell c 3 \stopxcell
> \stopxrow
> \startxrow
> \startxcell[suffix] cell a 4 \stopxcell
> \startxcell cell b 4 \stopxcell
> \startxcell cell c 4 \stopxcell
> \stopxrow
> \startxrow
> \startxcell[suffix] cell a 5 \stopxcell
> \startxcell cell b 5 \stopxcell
> \startxcell cell c 5 \stopxcell
> \stopxrow
> \stopxtablebody
> \stopxtable
>
>
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
[-- Attachment #1.2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: xtables: rowwise, columnwise, and cellwise operations
2018-01-05 16:12 ` Floris van Manen
@ 2018-01-05 21:49 ` Alan Braslau
0 siblings, 0 replies; 4+ messages in thread
From: Alan Braslau @ 2018-01-05 21:49 UTC (permalink / raw)
To: Floris van Manen; +Cc: mailing list for ConTeXt users
No, in ConTeXt one NEVER, EVER mixes key=value lists with simple
keywords (parsing would otherwise be very less efficient).
The feature to be able to declare a "namespace" (such as the
one called "suffix") having particular values of its parameters is
really powerful. Think of it as "xtable:suffix" that inherits from the
namespace "xtable" but then lives a life of its own...
\startxcell takes and optional namespace specification, i.e. [suffix]
and an optional key=value list of parameters, i.e. [ny=2,...]. These
parameters override locally the values that are otherwise carried by
the namespace.
ConTeXt gurus: I hope that I have gotten this explanation right.
Alan
On Fri, 5 Jan 2018 17:12:40 +0100
Floris van Manen <vm@klankschap.nl> wrote:
> apparently
>
> > \startxcell[suffix][ny=2] cell a 1 \stopxcell
>
> should be
>
> \startxcell[suffix, ny=2] cell a 1 \stopxcell
>
>
>
>
> > On 5 Jan 2018, at 14:32, Hans Hagen <pragma@wxs.nl> wrote:
> >
> > On 1/5/2018 4:57 AM, Henri wrote:
> >> Dear list,
> >> The Natural Tables have this great feature that I can control the
> >> layout with rowwise, columnwise, or cellwise setups. For example:
> >> \starttext
> >> \setupTABLE [frame=off]
> >> \setupTABLE [r] [first] [topframe=on,bottomframe=on,style=bold]
> >> \setupTABLE [c] [2] [style=italic]
> >> \setupTABLE [2] [3] [color=red]
> >> \setupTABLE [r] [last] [bottomframe=on]
> >> \startTABLE
> >> \NC A \NC A \NC A \NC\NR
> >> \NC B \NC B \NC B \NC\NR
> >> \NC C \NC C \NC C \NC\NR
> >> \NC D \NC D \NC D \NC\NR
> >> \NC E \NC E \NC E \NC\NR
> >> \stopTABLE
> >> \stoptext
> >
> > it's also an extremely inefficient method
> >
> >> How can I do such a thing with Extreme Tables? If it is not yet
> >> possible I'd like to request the inclusion of such a mechanism.
> > from the manual, named setups:
> >
> > \setupxtable[suffix][align=middle,foregroundcolor=red]
> > \setupxtable[blabla][foregroundstyle=slanted]
> > \setupxtable[crap] [foregroundcolor=blue]
> > \setupxtable[bold] [crap][foregroundstyle=bold]
> >
> > \startxtable % [frame=off]
> > \startxtablehead
> > \startxrow[bold]
> > \startxcell[suffix] head a \stopxcell
> > \startxcell[blabla] head b \stopxcell
> > \startxcell head c \stopxcell
> > \stopxrow
> > \stopxtablehead
> > \startxtablebody
> > \startxrow
> > \startxcell[suffix][ny=2] cell a 1 \stopxcell
> > \startxcell cell b 1 \stopxcell
> > \startxcell cell c 1 \stopxcell
> > \stopxrow
> > \startxrow
> > \startxcell cell b 2 \stopxcell
> > \startxcell cell c 2 \stopxcell
> > \stopxrow
> > \startxrow
> > \startxcell[suffix] cell a 3 \stopxcell
> > \startxcell cell b 3 \stopxcell
> > \startxcell cell c 3 \stopxcell
> > \stopxrow
> > \startxrow
> > \startxcell[suffix] cell a 4 \stopxcell
> > \startxcell cell b 4 \stopxcell
> > \startxcell cell c 4 \stopxcell
> > \stopxrow
> > \startxrow
> > \startxcell[suffix] cell a 5 \stopxcell
> > \startxcell cell b 5 \stopxcell
> > \startxcell cell c 5 \stopxcell
> > \stopxrow
> > \stopxtablebody
> > \stopxtable
> >
> >
> >
> > -----------------------------------------------------------------
> > Hans Hagen | PRAGMA ADE
> > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> > tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive :
> > https://bitbucket.org/phg/context-mirror/commits/ wiki :
> > http://contextgarden.net
> > ___________________________________________________________________________________
>
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-05 21:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-05 3:57 xtables: rowwise, columnwise, and cellwise operations Henri
2018-01-05 13:32 ` Hans Hagen
2018-01-05 16:12 ` Floris van Manen
2018-01-05 21:49 ` Alan Braslau
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).