···<date: 2013-08-04, Sunday>···<from: Philipp Gesang>···

> ···<date: 2013-08-04, Sunday>···<from: Dmitriy Tokarev>···
> 
> > Hi all,
> > 
> > I want to set the font size by using the dimension variable, but it doesn't 
> > work. What am I doing wrong?
> > 
> > \definemeasure[AAA][20pt]
> > \newdimen\BBB \BBB=20pt
> > 
> > \starttext
> > TEXT
> > 
> > % don't work
> > \switchtobodyfont[\measure{AAA}]
> > AAA
> > 
> > % don't work
> > \switchtobodyfont[\the\BBB]
> > BBB
> > 
> > % ok
> > \switchtobodyfont[20pt]
> > TEXT 20pt
> > 
> > \stoptext
> 
> Hi Dmitriy,
> 
> the size-related arguments to \switchtobodyfont and
> \setupbodyfont aren’t real TeX dimensions but identifiers for
> predefined bodyfont sets. Example:
> 
>   \def\mainfontsize{20pt}
>   \definebodyfontenvironment [\mainfontsize]
> 
>   \starttext
>     TEXT
>     \switchtobodyfont [\mainfontsize]
>     TEXT 20pt
>   \stoptext
> 
> See this thread for some background info:
> 
>   http://www.mail-archive.com/ntg-context@ntg.nl/msg63901.html

Sorry for the self-reply, but I just remembered that I already
wikified the topic:

  http://wiki.contextgarden.net/unexpected_behavior#Treacherous_Dimensions

Attachment: pgpLGdJkuwui0.pgp
Description: PGP signature

___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to