[NTG-context] structure head alignment nullifies spaceskip

Philipp Gesang pgesang at ix.urz.uni-heidelberg.de
Sun Mar 6 22:41:35 CET 2011


On 2011-03-06 <21:15:44>, Wolfgang Schuster wrote:
> 
> 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

Thanks a lot, Wolfgang, I hadn’t thought of “textcommand”.
Headings work (and look) like a charm now.

Best regards, Philipp



-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20110306/beec76e4/attachment.pgp>


More information about the ntg-context mailing list