![](https://secure.gravatar.com/avatar/74d41c3215dcdd377343cdc47311757c.jpg?s=120&d=mm&r=g)
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