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