Am 12.03.2015 um 18:37 schrieb Troy Henderson <thenders@gmail.com>:

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.

You can use natural tables or xtables to achieve this layout.

\starttext

\startsetups[table:layout]
\setupTABLE [start]      [frame=off,leftframe=on,rightframe=on,align=flushright,width=4em,loffset=.25em,roffset=.25em]
\setupTABLE [y]   [1,2]  [foregroundstyle=bold,background=screen,align=middle,frame=on]
\setupTABLE [x]   [1,2]  [foregroundstyle=bold,background=screen,frame=on]
\setupTABLE [1,2] [1,2]  [background=,frame=off,leftframe=off,rightframe=off]
\setupTABLE [x]   [1]    [align={middle,lohi},width=2em]
\setupTABLE [x]   [2]    [align=flushleft,width=6em]
\setupTABLE [y]   [last] [frame=on]
\stopsetups

\bTABLE[setups=table:layout]
\bTR
\bTD \eTD
\bTD \eTD
\bTD[nx=7] Years \eTD
\eTR
\bTR
\bTD \eTD
\bTD \eTD
\bTD \m{<1} \eTD
\bTD \m{1-2} \eTD
\bTD \m{3-4} \eTD
\bTD \m{5-9} \eTD
\bTD \m{10-14} \eTD
\bTD \m{15+} \eTD
\bTD Total \eTD
\eTR
\bTR
\bTD[ny=5] \rotate[rotation=90]{Region} \eTD
\bTD East \eTD
\bTD 32 \eTD
\bTD 54 \eTD
\bTD 59 \eTD
\bTD 112 \eTD
\bTD 77 \eTD
\bTD 118 \eTD
\bTD 452 \eTD
\eTR
\bTR
\bTD Midwest \eTD
\bTD 31 \eTD
\bTD 68 \eTD
\bTD 68 \eTD
\bTD 120 \eTD
\bTD 63 \eTD
\bTD 173 \eTD
\bTD 523 \eTD
\eTR
\bTR
\bTD South \eTD
\bTD 53 \eTD
\bTD 92 \eTD
\bTD 93 \eTD
\bTD 158 \eTD
\bTD 106 \eTD
\bTD 158 \eTD
\bTD 660 \eTD
\eTR
\bTR
\bTD West \eTD
\bTD 41 \eTD
\bTD 56 \eTD
\bTD 67 \eTD
\bTD 78 \eTD
\bTD 45 \eTD
\bTD 86 \eTD
\bTD 373 \eTD
\eTR
\bTR
\bTD Total \eTD
\bTD 157 \eTD
\bTD 270 \eTD
\bTD 287 \eTD
\bTD 468 \eTD
\bTD 291 \eTD
\bTD 535 \eTD
\bTD 2008 \eTD
\eTR
\eTABLE

\stoptext

Wolfgang