[NTG-context] Setup font size by dimension variable
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 -- 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 ___
Re: [NTG-context] Setup font size by dimension variable
···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 Best regards, Philipp pgpGIP_P7V63W.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 ___
Re: [NTG-context] Setup font size by dimension variable
···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 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 ___