[NTG-context] Tables, Row Span, and Colors

Troy Henderson thenders at gmail.com
Thu Mar 12 18:37:00 CET 2015


The following code produces my table, but I could not get the text "Region"
to span rows 3-7.  So, I would like


   1. the word "Region" to be inside the table and not "hacked" in the way
   that I have it.
   2. to make the (spanned) cell containing "Years" have a gray background.
   3. to make each of the "column heading" cells (i.e., the ones containing
   "<1", "1-2", ..., "15+", and "Total" to have a gray background.
   4. to have the (spanned) cell containing "Region" (from #1) have a gray
   background.
   5. to have the "row heading" cells (i.e., the ones containing "East",
   Midwest", "South", "West", and "Total") have a gray background.

I would appreciate any help in attaining this wish list.

Thanks in advance,

Troy

—— Code Starts Here ——

\setupcolors[state=start]
\starttext
    \null\vskip15ex
    \hskip1em\framed[orientation=90,frame=off]{\bf
Region}\blank\vskip-25.5ex
    \starttable[|c|l|r|r|r|r|r|r|r|]
        \DC \DC \DL[7] \DR
        \NC \NC \VL \use{7}\ReFormat[cB]{Years} \VL \AR
        \DC \DC \DL[7] \DR
        \NC \NC \VL \ReFormat[cB]{$<1$} \VL \ReFormat[cB]{$1-2$} \VL
\ReFormat[cB]{$3-4$} \VL \ReFormat[cB]{$5-9$} \VL \ReFormat[cB]{$10-14$}
\VL \ReFormat[cB]{$15+$} \VL \ReFormat[cB]{Total} \VL \AR
        \HL
%        \VL \offset[y=8ex]{\framed[orientation=90,frame=off]{\bf Region}}
\VL East \VL 32 \VL 54 \VL 59 \VL 112 \VL 77 \VL 118 \VL 452 \VL \AR
        \VL \null\hskip2em\null \VL {\bf East} \VL 32 \VL 54 \VL 59 \VL 112
\VL 77 \VL 118 \VL 452 \VL \AR
        \VL \VL {\bf Midwest} \VL 31 \VL 68 \VL 68 \VL 120 \VL 63 \VL 173
\VL 523 \VL \AR
        \VL \VL {\bf South} \VL 53 \VL 92 \VL 93 \VL 158 \VL 106 \VL 158
\VL 660 \VL \AR
        \VL \VL {\bf West} \VL 41 \VL 56 \VL 67 \VL 78 \VL 45 \VL 86 \VL
373 \VL \AR
        \DC \DL[8] \DR
        \VL \VL {\bf Total} \VL 157 \VL 270 \VL 287 \VL 468 \VL 291 \VL 535
\VL 2008 \VL \AR
        \HL
    \stoptable
\stoptext
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20150312/e138cde6/attachment.html>


More information about the ntg-context mailing list