ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Styling of naturaltable headings
@ 2012-03-15 13:31 Steffen Fritzsche
  2012-03-15 13:49 ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Steffen Fritzsche @ 2012-03-15 13:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 964 bytes --]

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

[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 4416 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Styling of naturaltable headings
  2012-03-15 13:31 Styling of naturaltable headings Steffen Fritzsche
@ 2012-03-15 13:49 ` Wolfgang Schuster
  2012-03-15 14:25   ` Steffen Fritzsche
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2012-03-15 13:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Styling of naturaltable headings
  2012-03-15 13:49 ` Wolfgang Schuster
@ 2012-03-15 14:25   ` Steffen Fritzsche
  2012-03-15 14:36     ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Steffen Fritzsche @ 2012-03-15 14:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 752 bytes --]


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

[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 4416 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Styling of naturaltable headings
  2012-03-15 14:25   ` Steffen Fritzsche
@ 2012-03-15 14:36     ` Wolfgang Schuster
  2012-03-15 14:59       ` Steffen Fritzsche
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2012-03-15 14:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Styling of naturaltable headings
  2012-03-15 14:36     ` Wolfgang Schuster
@ 2012-03-15 14:59       ` Steffen Fritzsche
  2012-03-15 15:18         ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Steffen Fritzsche @ 2012-03-15 14:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 561 bytes --]

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


[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 4416 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Styling of naturaltable headings
  2012-03-15 14:59       ` Steffen Fritzsche
@ 2012-03-15 15:18         ` Wolfgang Schuster
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2012-03-15 15:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-03-15 15:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-15 13:31 Styling of naturaltable headings Steffen Fritzsche
2012-03-15 13:49 ` Wolfgang Schuster
2012-03-15 14:25   ` Steffen Fritzsche
2012-03-15 14:36     ` Wolfgang Schuster
2012-03-15 14:59       ` Steffen Fritzsche
2012-03-15 15:18         ` Wolfgang Schuster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).