[NTG-context] two problems with natural tables

Florian Wobbe Florian.Wobbe at awi.de
Mon Apr 11 09:37:48 CEST 2011


>> 2) How do I get a small and bold header? This does not work:
>> 
>> \bTABLE
>> \setupTABLE[style=\tfx]
>> \setupTABLE[row][1][style=\bfx] % redundant w/ line 5
>> \bTABLEhead
>> \bTR[style=\bfx] \bTH Header \eTH \eTR
>> \eTABLEhead
>> \bTABLEbody
>> \bTR \bTD hello \eTD \eTR
>> \bTR \bTD world \eTD \eTR
>> \eTABLEbody
>> \eTABLE
> 
> You mix too many setups, \bTH overwrites your setting for the row (\bTR[style=\tfx])
> and also your other setting (\setupTABLE[row][1][style=\bfx]). Here is one to separate
> the style and the markup
> 
> \startsetups table:style
> 	\setupTABLE[start] [style=\tfx]
> 	\setupTABLE[header][style=\bfx]
> \stopsetups
> 
> \starttext
> 
> \bTABLE[setups=table:style]
> \bTABLEhead
> \bTR \bTD Header \eTD \eTR
> \eTABLEhead
> \bTABLEbody
> \bTR \bTD Body \eTD \eTR
> \eTABLEbody
> \eTABLE
> 
> \stoptext

Thanks Wolfgang,

so to make style=... also work on the header the trick was to change
  \bTH Header \eTH
to
  \bTD Header \eTD.

What is the purpose of \bTH \eTH then? BTW the Wiki says: "Please take account of the fact, that the head cells are enclosed by \bTH and \eTH (and not \[be]TC)."

\bTH seems to only override style=... since "\bTD Header \eTD" is repeated correctly with \bTABLE[split=repeat,setups=table:style].

Florian



More information about the ntg-context mailing list