[NTG-context] how to include sans, bold and size in \setuptab[headstyle=???]

Wolfgang Schuster schuster.wolfgang at gmail.com
Mon Nov 11 18:27:52 CET 2013


> Lars Huttar <mailto:lars_huttar at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20131111/db5df088/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compose-unknown-contact.jpg
Type: image/jpeg
Size: 770 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20131111/db5df088/attachment-0001.jpg>


More information about the ntg-context mailing list