ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* smaller-bigger fontsize
@ 2010-03-10 12:39 Hans van der Meer
  2010-03-10 14:40 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Hans van der Meer @ 2010-03-10 12:39 UTC (permalink / raw)
  To: NTG ConTeXt

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: smaller-bigger fontsize
  2010-03-10 12:39 smaller-bigger fontsize Hans van der Meer
@ 2010-03-10 14:40 ` Wolfgang Schuster
  2010-03-10 16:10   ` Hans van der Meer
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2010-03-10 14:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: smaller-bigger fontsize
  2010-03-10 14:40 ` Wolfgang Schuster
@ 2010-03-10 16:10   ` Hans van der Meer
  2010-03-10 16:29     ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Hans van der Meer @ 2010-03-10 16:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: smaller-bigger fontsize
  2010-03-10 16:10   ` Hans van der Meer
@ 2010-03-10 16:29     ` Wolfgang Schuster
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2010-03-10 16:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-10 16:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-10 12:39 smaller-bigger fontsize Hans van der Meer
2010-03-10 14:40 ` Wolfgang Schuster
2010-03-10 16:10   ` Hans van der Meer
2010-03-10 16:29     ` Wolfgang Schuster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).