[NTG-context] structure head alignment nullifies spaceskip

Wolfgang Schuster schuster.wolfgang at googlemail.com
Sun Mar 6 21:15:44 CET 2011


Am 06.03.2011 um 17:33 schrieb Philipp Gesang:

> Hi,
> 
> is there a way to have \spaceskip working in a centered section
> head?
> 
> I have something similar to these exaggerated values:
> 
> ··8<·····························································
> 
> \def\broadspacing{%
>  \dontleavehmode%
>  \spaceskip 1em plus .5em minus .5em%
> }
> \starttext
> 
> \setuphead[section][%
>  style={\WORD\broadspacing},
> ]
> 
> % This one is left aligned but correctly spaced.
> \section{test test test}
> 
> \setuphead[section][%
>  style={\WORD\broadspacing},
>  align=middle,
> ]
> 
> % This one is centered but spaced too tightly.
> \section{test test test}
> 
> \stoptext
> 
> ··8<·····························································
> 
> As you can see, adding “align=middle” to the section setup leads
> to the \spaceskip setting being ignored. Any idea how to space my
> capitalized words in section heads?

\setuphead
  [section]
  [      style=WORD,
         align=middle,
   textcommand={\setuptolerance[space]}]

Maybe better is “textcommand=\SectionCommand” with

\define[1]\SectionCommand
  {\setuptolerance[space]#1}

Wolfgang



More information about the ntg-context mailing list