[NTG-context] \switchtobodyfont behaves differenctly with splitted parameters

Sylvain Hubert champignoom at gmail.com
Sun Nov 8 13:08:23 CET 2020


On Sun, 8 Nov 2020 at 12:52, Hans Hagen <j.hagen at xs4all.nl> wrote:

> On 11/8/2020 12:46 PM, Sylvain Hubert wrote:
> > On Sun, 8 Nov 2020 at 12:14, Hans Hagen <j.hagen at xs4all.nl
> > <mailto:j.hagen at xs4all.nl>> wrote:
> >
> >     when yyou use several bodyfonts you can do this before \starttext:
> >
> >     \usebodyfont[face,24pt]
> >     \usebodyfont[deface]
> >
> >     \starttext
> >         ....
> >     \stoptext
> >
> >
> > Thank you for the information, Hans!
> >
> > Could you please also shed some light on the relation/difference among
> > \{setup,switchto,use}bodyfont?
> > There seems to be not much documentation on this. Can one conclude, from
> > the wiki <https://wiki.contextgarden.net/Command/switchtobodyfont> and
> > the source code
> > <
> https://source.contextgarden.net/tex/context/base/mkiv/font-ini.mklx#l2287>,
>
> > that they are mostly the same, except that \switchtobodyfont is
> > restricted to the content area, and \usebodyfont is a helper to call
> > \setupbodyfont in the beginning?
> >
> > If this is the case, is it recommended to always put a
> > \setupbodyfont[...] in the beginning, even if it's just a
> > \setupbodyfont[modern]?
> > One reason might be that the following example somehow enlarges the page
> > number in the header, intuitively contradicting what is claimed by the
> > wiki <https://wiki.contextgarden.net/Command/switchtobodyfont>:
> >
> >      \switchtobodyfont[dejavu]
> >      \starttext \switchtobodyfont[dejavu, 24pt]a\stoptext
>
> \setup  is document wide
> \switch is for local usage
>

So \switchtobodyfont before \starttext is semantically an error then.
Thanks for the confirmation!


> (has to do with picking up font/space related issues after page breaks
> and when typesetting page ornaments like headers and footers)
>
>
>
> -----------------------------------------------------------------
>                                            Hans Hagen | PRAGMA ADE
>                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>         tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
>

Sylvain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20201108/fbd286ae/attachment-0001.htm>


More information about the ntg-context mailing list