Background
==========

Set up zebra striping using extreme tables. The ConTeXt tables are generated by converting an ASCII Markdown table via pandoc.

Minimum Example
===============

```
\starttext
  \startplacetable[]
  \startxtable
  \startxtablehead[head]
  \startxrow
  \startxcell Item \stopxcell
  \startxcell[align=left] Cost (\$) \stopxcell
  \startxcell[align=left] Description \stopxcell
  \stopxrow
  \stopxtablehead
  \startxtablebody[body]
  \dorecurse{4}{
  \startxrow
  \startxcell Item \stopxcell
  \startxcell[align=left] 100 \stopxcell
  \startxcell[align=left] Cow text \stopxcell
  \stopxrow
  }
  \stopxtablebody
  \startxtablefoot[foot]
  \startxrow
  \startxcell {\bf Total} \stopxcell
  \startxcell[align=left] {\bf 400} \stopxcell
  \startxcell[align=left]  \stopxcell
  \stopxrow
  \stopxtablefoot
  \stopxtable
  \stopplacetable
\stoptext

```

Problem
=======

ConTeXt, which is rather consistent with its `setup` macros, [does not appear](http://www.pragma-ade.nl/general/manuals/xtables-mkiv.pdf) to define a `\setupxrow` or `\setupxcell`. I had anticipated something like:

```
\definecolor[lime][r=0.75, g=1, b=0] 
\definecolor[transparentred][r=1,t=.5,a=1]
\setupxrow[odd][background=lime]
\setupxrow[even][background=transparentred]

```

This did not compile.

Question
========

Without using `definextable` to create a custom xtable definition, how would you apply [zebra striping](https://alistapart.com/article/zebrastripingdoesithelp) so that every other non-header row has a coloured background?

Update
======

It appears as though the `OverlayBox` is off by a few points.

![OverlayBox Edges](https://i.stack.imgur.com/OnCID.png)

The configuration code:

```
\definecolor[ColourTertiaryLt][h=a6b6b8]

\setupfloat[table][default={here,split}]

\setupxtable[
  frame=off,
  split=yes,
  header=repeat,
  framecolor=ColourTertiary,
]
\setupxtable[head][
  topframe=on,
  bottomframe=on,
]
\setupxtable[body][]
\setupxtable[foot][
  bottomframe=on,
]

\startuseMPgraphic {tablebackground}
  fill OverlayBox withcolor \MPcolor{ColourTertiaryLt} ;
\stopuseMPgraphic

\defineoverlay[tablebackground][
  \ifnum\currentxtablerow>1
    \ifodd\currentxtablerow\else
      \useMPgraphic{tablebackground}%
    \fi
  \fi
]

\setupxtable[background=tablebackground]

```