Styling of naturaltable headings
Hi, using the latest beta I have the following problem styling my table headings based on the naturaltables module. My test document looks as follows \setupTABLE[frame=off,option=stretch] \setupTABLE[c][each][style=\ss] % Styling 1 \setupTABLE[r][first][style={\ss},bottomframe=on] % Styling 2 \starttext \placetable [here][tab:example] {A very simple example of a table.}{ \bTABLE \bTABLEhead \bTR \bTH col1 \eTH \bTH col2 \eTH \eTR \eTABLEhead \bTABLEbody \bTR \bTC this \eTC \bTC is \eTC \eTR \bTR \bTC a \eTC \bTC table \eTC \eTR \eTABLEbody \eTABLE } \stoptext Neither the line marked "Styling 1" nor the line marked "Styling 2" do switch to a sans serif font in the table head. "Styling 1" does this correctly for the table body but not for the head. Any ideas how I might get an sans serif font in my table heading? Thanks! Steffen
Am 15.03.2012 um 14:31 schrieb Steffen Fritzsche:
Hi,
using the latest beta I have the following problem styling my table headings based on the naturaltables module. My test document looks as follows
\setupTABLE[frame=off,option=stretch] \setupTABLE[c][each][style=\ss] % Styling 1 \setupTABLE[r][first][style={\ss},bottomframe=on] % Styling 2
\starttext \placetable [here][tab:example] {A very simple example of a table.}{ \bTABLE \bTABLEhead \bTR \bTH col1 \eTH \bTH col2 \eTH \eTR \eTABLEhead \bTABLEbody \bTR \bTC this \eTC \bTC is \eTC \eTR \bTR \bTC a \eTC \bTC table \eTC \eTR \eTABLEbody \eTABLE } \stoptext
Neither the line marked "Styling 1" nor the line marked "Styling 2" do switch to a sans serif font in the table head. "Styling 1" does this correctly for the table body but not for the head.
Any ideas how I might get an sans serif font in my table heading?
\setupTABLE[header][each][style=sans] Wolfgang
Am 15.03.2012 um 14:49 schrieb Wolfgang Schuster:
Any ideas how I might get an sans serif font in my table heading?
\setupTABLE[header][each][style=sans]
Thanks for your answer, but this does not work for me. I changed my definition to \setupTABLE[frame=off,option=stretch] \setupTABLE[c][each][style=\ss] \setupTABLE[header][each][style=sans,background=color,backgroundcolor=gray] While this gives me a nice gray background, it still uses a serif font. Since the background is applied I guess it somehow drops anything which is defined as style. Any other ideas or is this a bug? Steffen
Am 15.03.2012 um 15:25 schrieb Steffen Fritzsche:
Am 15.03.2012 um 14:49 schrieb Wolfgang Schuster:
Any ideas how I might get an sans serif font in my table heading?
\setupTABLE[header][each][style=sans]
Thanks for your answer, but this does not work for me. I changed my definition to
\setupTABLE[frame=off,option=stretch] \setupTABLE[c][each][style=\ss] \setupTABLE[header][each][style=sans,background=color,backgroundcolor=gray]
While this gives me a nice gray background, it still uses a serif font. Since the background is applied I guess it somehow drops anything which is defined as style.
Any other ideas or is this a bug?
Don’t use \bTH when you use put the header in a \bTABLEhead … \eTABLEhead block because the \bTH command applies a format the the cells, when you use \bTD instead no formatting is applied and the \setupTABLE setting is used. Wolfgang
Am 15.03.2012 um 15:36 schrieb Wolfgang Schuster:
Don’t use \bTH when you use put the header in a \bTABLEhead … \eTABLEhead block because the \bTH command applies a format the the cells, when you use \bTD instead no formatting is applied and the \setupTABLE setting is used.
Thanks Wolfgang, this gives me the desired result. I used TH because the wiki states on should use TH not TC when inside a TABLEhead, see http://wiki.contextgarden.net/TABLE#Multipage_TABLEs However, I wasn't aware that one might use TD inside a TABLEhead. Steffen
Am 15.03.2012 um 15:59 schrieb Steffen Fritzsche:
Am 15.03.2012 um 15:36 schrieb Wolfgang Schuster:
Don’t use \bTH when you use put the header in a \bTABLEhead … \eTABLEhead block because the \bTH command applies a format the the cells, when you use \bTD instead no formatting is applied and the \setupTABLE setting is used.
Thanks Wolfgang, this gives me the desired result.
I used TH because the wiki states on should use TH not TC when inside a TABLEhead, see
http://wiki.contextgarden.net/TABLE#Multipage_TABLEs
However, I wasn't aware that one might use TD inside a TABLEhead.
The \bTH command is only a modified version of \bTD which uses a different color and style for the content and disables the aligncharacter option (which can be used to align numbers on “.” or “,” etc.). The style and color of \bTH can be changed with the “headstyle” and “headcolor” keys but for long tables with \bTABLEhead etc. \bTD with a special setting for the header does the same. Wolfgang
participants (2)
-
Steffen Fritzsche
-
Wolfgang Schuster