* how to include sans, bold and size in \setuptab[headstyle=???]
@ 2013-11-11 17:00 Lars Huttar
2013-11-11 17:27 ` Wolfgang Schuster
0 siblings, 1 reply; 3+ messages in thread
From: Lars Huttar @ 2013-11-11 17:00 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hello, I have the following MWE:
\starttext
\setuptab[headstyle=ssbfb]
\tab{foo} \input knuth \par
\stoptext
Here, the headstyle specifies a sans font with boldface style, at 1.44
times the current bodyfont size.
However, I want to be able to specify an absolute point size, instead of
a relative size.
I tried variations like
\setuptab[headstyle=18pt]
but that has no effect: the size remains 12pt, or whatever the default is.
If I use
\setuptab[headstyle={\switchtobodyfont[18pt]}]
then the size takes effect (for the key only, which is what I want).
I can combine that with sans:
\setuptab[headstyle={\switchtobodyfont[ss, 18pt]}]
and that works.
But how to mix in boldface?
\setuptab[headstyle={\switchtobodyfont[ssbf, 18pt]}]
doesn't give sans boldface, but reverts to a serif, non-bold style (at
18pt size).
\setuptab[headstyle={\switchtobodyfont[ss, bf, 18pt]}]
gives the same results.
I finally tried
\setuptab[headstyle={\ssbf \switchtobodyfont[18pt]}]
and that works! But it seems clunky: it looks like it requires two font
switches, which I'm told makes things slower.
And I can't help wondering if I'm missing some simpler way.
Is there a more efficient or elegant way to do this?
Thanks,
Lars
___________________________________________________________________________________
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] 3+ messages in thread
* Re: how to include sans, bold and size in \setuptab[headstyle=???]
2013-11-11 17:00 how to include sans, bold and size in \setuptab[headstyle=???] Lars Huttar
@ 2013-11-11 17:27 ` Wolfgang Schuster
2013-11-11 21:45 ` Lars Huttar
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2013-11-11 17:27 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1487 bytes --]
> Lars Huttar <mailto:lars_huttar@sil.org>
> 11. November 2013 18:00
> Hello, I have the following MWE:
> \starttext
>
> \setuptab[headstyle=ssbfb]
>
\setuptab[headstyle=\ssbfb]
> \tab{foo} \input knuth \par
>
> \stoptext
>
>
> Here, the headstyle specifies a sans font with boldface style, at 1.44
> times the current bodyfont size.
>
>
> However, I want to be able to specify an absolute point size, instead of
> a relative size.
>
> I tried variations like
>
> \setuptab[headstyle=18pt]
>
> but that has no effect: the size remains 12pt, or whatever the default is.
>
> If I use
> \setuptab[headstyle={\switchtobodyfont[18pt]}]
>
> then the size takes effect (for the key only, which is what I want).
> I can combine that with sans:
> \setuptab[headstyle={\switchtobodyfont[ss, 18pt]}]
>
> and that works.
>
>
> But how to mix in boldface?
> \setuptab[headstyle={\switchtobodyfont[ssbf, 18pt]}]
>
> doesn't give sans boldface, but reverts to a serif, non-bold style (at
> 18pt size).
>
> \setuptab[headstyle={\switchtobodyfont[ss, bf, 18pt]}]
>
> gives the same results.
>
>
> I finally tried
>
> \setuptab[headstyle={\ssbf \switchtobodyfont[18pt]}]
>
> and that works! But it seems clunky: it looks like it requires two font
> switches, which I'm told makes things slower.
>
> And I can't help wondering if I'm missing some simpler way.
> Is there a more efficient or elegant way to do this?
>
\definefont[BigBoldSans][SansBold at 18pt]
\setuptab[headstyle=BigBoldSans]
Wolfgang
[-- Attachment #1.2.1: Type: text/html, Size: 3082 bytes --]
[-- Attachment #1.2.2: compose-unknown-contact.jpg --]
[-- Type: image/jpeg, Size: 770 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] 3+ messages in thread
* Re: how to include sans, bold and size in \setuptab[headstyle=???]
2013-11-11 17:27 ` Wolfgang Schuster
@ 2013-11-11 21:45 ` Lars Huttar
0 siblings, 0 replies; 3+ messages in thread
From: Lars Huttar @ 2013-11-11 21:45 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 11/11/2013 12:27 PM, Wolfgang Schuster wrote:
>> Lars Huttar <mailto:lars_huttar@sil.org>
>> 11. November 2013 18:00
>> I finally tried
>>
>> \setuptab[headstyle={\ssbf \switchtobodyfont[18pt]}]
>>
>> and that works! But it seems clunky: it looks like it requires two font
>> switches, which I'm told makes things slower.
>>
>> And I can't help wondering if I'm missing some simpler way.
>> Is there a more efficient or elegant way to do this?
>>
> \definefont[BigBoldSans][SansBold at 18pt]
>
> \setuptab[headstyle=BigBoldSans]
OK, but in order to use this systematically, I would have to have a
\definefont for every potential combination of font style (serif/sans),
alternative (bold/italic/etc.), and size that will get used in the
document. In a large, complex book, that extra layer of indirection
seems unattractive. But maybe there's no better way to do it.
Lars
___________________________________________________________________________________
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] 3+ messages in thread
end of thread, other threads:[~2013-11-11 21:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-11 17:00 how to include sans, bold and size in \setuptab[headstyle=???] Lars Huttar
2013-11-11 17:27 ` Wolfgang Schuster
2013-11-11 21:45 ` Lars Huttar
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).