[NTG-context] Natural tables, rulethickness

Peter Rolf indiego at gmx.net
Sat Mar 4 16:42:31 CET 2006


Hi Patrick,

Patrick Gundlach wrote:
> Hello,
> 
> I have a (natural) table and I'd like to have three rules in that
> table. The toprule and the bottomrule should be .08em thick, the
> midrule 0.05em. What would be a way to achieve that? The example is
> incorrect.
> 
> 
> \starttext
> 
> \setupTABLE[r][each][frame=off]
> \setupTABLE[r][first][topframe=on,rulethickness=.08em]
> \setupTABLE[r][first][bottomframe=on,rulethickness=.05em]
> \setupTABLE[r][last][bottomframe=on,rulethickness=.08em]
> \bTABLE

You can't use different frame sizes in the same frame (as in \framed). A
simple solution is

\setupTABLE[r][2][topframe=on,rulethickness=.05em]

instead of using a bottomframe. Or maybe better

\setupTABLE[r][first][topframe=on,rulethickness=.08em,
  after={\hrule width\hsize height.05em}]

You can adjust the vertical spacing by using

\setupTABLE[r][first][topframe=on,rulethickness=.08em,
  after={\hbox{\raise 5pt\hbox{\vrule width\hsize height.05em}}}]

But the second solution maybe has some unwanted sideeffects (page
breaks,..). I've tried to use \hrule in combination with 'before=', but
this does not work here. Hope this helps.

Greetings, Peter

> \bTR \bTD Lorem \eTD \bTD ipsum \eTD \bTD dolor sit \eTD \eTR
> \bTR \bTD amet \eTD \bTD[nc=2] consectetuer adipiscing elit \eTD  \eTR
> \bTR \bTD 1 \eTD \bTD  \eTD \bTD Donec hendrerit tempor tellus. Donec pretium posuere\eTD \eTR
> \bTR \bTD 2 \eTD \bTD  \eTD \bTD tellus. Proin quam nisl, tincidunt
> et, mattis eget, convallis nec, \unknown \eTD \eTR
> \bTR \bTD  \eTD \bTD[nc=2] purus. Cum sociis \eTD \eTR
> \bTR \bTD 3 (natoque) \eTD \bTD penatibus \eTD \bTD  \eTD \eTR
> \bTR \bTD 5 \eTD \bTD[nc=2] et magnis dis \eTD  \eTR
> \bTR \bTD 6 \eTD \bTD parturient \eTD \bTD montes, nascetur ridiculus \eTD \eTR
> \bTR \bTD  \eTD \bTD mus \eTD \bTD Nulla posuere. Donec vitae dolor \eTD \eTR
> \eTABLE
> \stoptext
> 
> Patrick



More information about the ntg-context mailing list