04.08.2013, 16:49, "Philipp Gesang" <philipp.ges...@alumni.uni-heidelberg.de>: >> 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 >
Thanks, Philipp! Now I realized that before the first use of "switchtobodyfont" I need to write "definebodyfontenvironment". In this case, everything is fine. I also found another way without definebodyfontenvironment: \definemeasure[AAA][20.123pt] \newdimen\BBB \BBB=25.127pt \starttext TEXT % ok \normalizebodyfontsize\normalizedAAA{\measure{AAA}} \switchtobodyfont[\normalizedAAA] AAA \normalizedAAA % ok \normalizebodyfontsize\normalizedBBB\BBB \switchtobodyfont[\normalizedBBB] BBB \normalizedBBB \stoptext Is this code correct? Or it's better for some reason using "definebodyfontenvironment"? -- Dmitriy ___________________________________________________________________________________ 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 ___________________________________________________________________________________