* Every odd row with a background color with extreme tables?
@ 2021-07-23 15:55 T. Kurt Bond
2021-07-23 16:34 ` Henning Hraban Ramm
2021-07-23 17:01 ` Wolfgang Schuster
0 siblings, 2 replies; 4+ messages in thread
From: T. Kurt Bond @ 2021-07-23 15:55 UTC (permalink / raw)
To: ntg-context
With natural tables I can define a color, tell the table to have to
use color backgrounds and turn the frame off and get every odd row in
all my tables will have that color for the background.
========== Example ============================================================
\definecolor[grayback][r=.8,g=.8,b=.8]
\setupTABLE[background=color,frame=off]
\setupTABLE[row][odd][backgroundcolor=grayback]
========== End of Example =====================================================
Can I get this same effect with extreme tables?
My first try with extreme tables looked like this:
========== Example ============================================================
\definecolor[tablebackground][r=.8,g=.8,b=.8]
\setupxtable[background=color,frame=off]
\setupxtable[row][odd][backgroundcolor=tablebackground]
========== End of Example =====================================================
That didn't seem to have any effect.
Is there a way to have every odd row of every table in my document
have color background?
--
T. Kurt Bond, tkurtbond@gmail.com, tkurtbond.github.io and tkb.tx0.org
___________________________________________________________________________________
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: Every odd row with a background color with extreme tables?
2021-07-23 15:55 Every odd row with a background color with extreme tables? T. Kurt Bond
@ 2021-07-23 16:34 ` Henning Hraban Ramm
2021-07-23 17:01 ` Wolfgang Schuster
1 sibling, 0 replies; 4+ messages in thread
From: Henning Hraban Ramm @ 2021-07-23 16:34 UTC (permalink / raw)
To: mailing list for ConTeXt users
> Am 23.07.2021 um 17:55 schrieb T. Kurt Bond <tkurtbond@gmail.com>:
>
> With natural tables I can define a color, tell the table to have to
> use color backgrounds and turn the frame off and get every odd row in
> all my tables will have that color for the background.
>
> Can I get this same effect with extreme tables?
>
> My first try with extreme tables looked like this:
>
> ========== Example ============================================================
> \definecolor[tablebackground][r=.8,g=.8,b=.8]
> \setupxtable[background=color,frame=off]
> \setupxtable[row][odd][backgroundcolor=tablebackground]
> ========== End of Example =====================================================
>
> That didn't seem to have any effect.
\setupxtables has only a limited set of parameters:
https://wiki.contextgarden.net/Command/setupxtable
> Is there a way to have every odd row of every table in my document
> have color background?
As far as I can see, only via “styles” that you can setup with \definextable:
https://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf
Hraban
___________________________________________________________________________________
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: Every odd row with a background color with extreme tables?
2021-07-23 15:55 Every odd row with a background color with extreme tables? T. Kurt Bond
2021-07-23 16:34 ` Henning Hraban Ramm
@ 2021-07-23 17:01 ` Wolfgang Schuster
2021-07-23 17:50 ` T. Kurt Bond
1 sibling, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2021-07-23 17:01 UTC (permalink / raw)
To: mailing list for ConTeXt users
T. Kurt Bond schrieb am 23.07.2021 um 17:55:
> With natural tables I can define a color, tell the table to have to
> use color backgrounds and turn the frame off and get every odd row in
> all my tables will have that color for the background.
>
> ========== Example ============================================================
> \definecolor[grayback][r=.8,g=.8,b=.8]
> \setupTABLE[background=color,frame=off]
> \setupTABLE[row][odd][backgroundcolor=grayback]
> ========== End of Example =====================================================
>
> Can I get this same effect with extreme tables?
>
> My first try with extreme tables looked like this:
>
> ========== Example ============================================================
> \definecolor[tablebackground][r=.8,g=.8,b=.8]
> \setupxtable[background=color,frame=off]
> \setupxtable[row][odd][backgroundcolor=tablebackground]
> ========== End of Example =====================================================
>
> That didn't seem to have any effect.
>
> Is there a way to have every odd row of every table in my document
> have color background?
\startuseMPgraphic{xtablerow}
fill OverlayBox withcolor "gray";
\stopuseMPgraphic
\defineoverlay
[xtablerow]
[\ifodd\currentxtablerow
\useMPgraphic{xtablerow}%
\fi]
\starttext
\startxtable[frame=off,background=xtablerow]
\dorecurse{20}
{\startxrow
\startxcell Column 1 \stopxcell
\startxcell Column 2 \stopxcell
\stopxrow}
\stopxtable
\stoptext
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://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: Every odd row with a background color with extreme tables?
2021-07-23 17:01 ` Wolfgang Schuster
@ 2021-07-23 17:50 ` T. Kurt Bond
0 siblings, 0 replies; 4+ messages in thread
From: T. Kurt Bond @ 2021-07-23 17:50 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2321 bytes --]
Thanks, this has been very helpful.
On Fri, Jul 23, 2021 at 1:02 PM Wolfgang Schuster <
wolfgang.schuster.lists@gmail.com> wrote:
> T. Kurt Bond schrieb am 23.07.2021 um 17:55:
> > With natural tables I can define a color, tell the table to have to
> > use color backgrounds and turn the frame off and get every odd row in
> > all my tables will have that color for the background.
> >
> > ========== Example
> ============================================================
> > \definecolor[grayback][r=.8,g=.8,b=.8]
> > \setupTABLE[background=color,frame=off]
> > \setupTABLE[row][odd][backgroundcolor=grayback]
> > ========== End of Example
> =====================================================
> >
> > Can I get this same effect with extreme tables?
> >
> > My first try with extreme tables looked like this:
> >
> > ========== Example
> ============================================================
> > \definecolor[tablebackground][r=.8,g=.8,b=.8]
> > \setupxtable[background=color,frame=off]
> > \setupxtable[row][odd][backgroundcolor=tablebackground]
> > ========== End of Example
> =====================================================
> >
> > That didn't seem to have any effect.
> >
> > Is there a way to have every odd row of every table in my document
> > have color background?
>
> \startuseMPgraphic{xtablerow}
> fill OverlayBox withcolor "gray";
> \stopuseMPgraphic
>
> \defineoverlay
> [xtablerow]
> [\ifodd\currentxtablerow
> \useMPgraphic{xtablerow}%
> \fi]
>
> \starttext
>
> \startxtable[frame=off,background=xtablerow]
> \dorecurse{20}
> {\startxrow
> \startxcell Column 1 \stopxcell
> \startxcell Column 2 \stopxcell
> \stopxrow}
> \stopxtable
>
> \stoptext
>
> 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://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___________________________________________________________________________________
>
--
T. Kurt Bond, tkurtbond@gmail.com, https://tkurtbond.github.io
[-- Attachment #1.2: Type: text/html, Size: 3617 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 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
end of thread, other threads:[~2021-07-23 17:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-23 15:55 Every odd row with a background color with extreme tables? T. Kurt Bond
2021-07-23 16:34 ` Henning Hraban Ramm
2021-07-23 17:01 ` Wolfgang Schuster
2021-07-23 17:50 ` T. Kurt Bond
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).