[NTG-context] smaller-bigger fontsize
ConTeXt fontsizing has \tx to make the current font style one step smaller, then another \txx does that again. For makeing the size bigger I cannot see anything other than the series \tfa \tfb \tfc \tfd. It would however be nice to also have a similar cumulative effect here. Can there be something like \tsmall available to reduce the font size one step (to a certain minimum, not just \tx\tx = \txx)? And similar \tbig to enlarge the font size one step? It will make the equivalent of HTML's small and big tags easy to implement for typesetting my xml data. Or are there already such things? Hans van der Meer ___ 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] smaller-bigger fontsize
Am 10.03.10 13:39, schrieb Hans van der Meer: ConTeXt fontsizing has \tx to make the current font style one step smaller, then another \txx does that again. For makeing the size bigger I cannot see anything other than the series \tfa \tfb \tfc \tfd. It would however be nice to also have a similar cumulative effect here. Can there be something like \tsmall available to reduce the font size one step (to a certain minimum, not just \tx\tx = \txx)? And similar \tbig to enlarge the font size one step? It will make the equivalent of HTML's small and big tags easy to implement for typesetting my xml data. Or are there already such things? \startxmlsetups big \bgroup \switchtobodyfont[\the\dimexpr\bodyfontsize+2pt\relax] \xmlflush{#1} \egroup \stopxmlsetups \startxmlsetups small \bgroup \switchtobodyfont[\the\dimexpr\bodyfontsize-2pt\relax] \xmlflush{#1} \egroup \stopxmlsetups Wolfgang ___ 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] smaller-bigger fontsize
Thanks Wolfgang. This works. See below for some refinements I find usefull. On 10 mrt 2010, at 15:40, Wolfgang Schuster wrote: Am 10.03.10 13:39, schrieb Hans van der Meer: ConTeXt fontsizing has \tx to make the current font style one step smaller, then another \txx does that again. For makeing the size bigger I cannot see anything other than the series \tfa \tfb \tfc \tfd. It would however be nice to also have a similar cumulative effect here. Can there be something like \tsmall available to reduce the font size one step (to a certain minimum, not just \tx\tx = \txx)? And similar \tbig to enlarge the font size one step? It will make the equivalent of HTML's small and big tags easy to implement for typesetting my xml data. Or are there already such things? \startxmlsetups big \bgroup \switchtobodyfont[\the\dimexpr\bodyfontsize+2pt\relax] \switchtobodyfont[\the\dimexpr\bodyfontsize+\xmlattdef{#1}{step}{2pt} \relax] \xmlflush{#1} \egroup \stopxmlsetups \startxmlsetups small \bgroup \switchtobodyfont[\the\dimexpr\bodyfontsize-2pt\relax] \scratchdimen=\the\dimexpr\bodyfontsize\relax \advance\scratchdimen-\xmlattdef{#1}{step}{2pt}\relax \ifdim\scratchdimen\xmlattdef{#1}{min}{4pt}\relax\scratchdimen= \xmlattdef{#1}{min}{4pt}\fi \switchtobodyfont[\the\scratchdimen] \xmlflush{#1} \egroup \stopxmlsetups Wolfgang ___ 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 ___ ___ 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] smaller-bigger fontsize
Am 10.03.10 17:10, schrieb Hans van der Meer: \scratchdimen=\the\dimexpr\bodyfontsize\relax \advance\scratchdimen-\xmlattdef{#1}{step}{2pt}\relax \ifdim\scratchdimen\xmlattdef{#1}{min}{4pt}\relax\scratchdimen=\xmlattdef{#1}{min}{4pt}\fi \scratchdimen\ifdim\bodyfontsize\xmlattdef{#1}{min}{4pt}\relax \xmlattdef{#1}{min}{4pt} \else \bodyfontsize-\xmlattdef{#1}{step}{2pt} \fi \switchtobodyfont[\the\scratchdimen] or \switchtobodyfont [\the\dimexpr\ifdim\bodyfontsize\xmlattdef{#1}{min}{4pt}\relax \xmlattdef{#1}{min}{4pt} \else \bodyfontsize-\xmlattdef{#1}{step}{2pt} \fi\relax] Wolfgang ___ 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 ___