Re: [NTG-context] Centered title with numeration on the same line
On 6/3/2013 6:57 PM, Jan Tosovsky wrote:
Dear All,
in MkIV when any title is centered, its numeration is placed on a separate line above the title itself.
I'd expect inline formatting which could be overridden as described here http://wiki.contextgarden.net/Titles
My code:
\setuplabeltext[en][chapter=Chapter~]
% while for chapter title this line break is handy (in my use case) \setuphead[chapter][ alternative=middle, style=\bfc, conversion=Romannumerals, numbercommand=\groupedcommand{\cap}{\blank[0.5cm]}, after={\blank[1cm]}, ]
% for section it is inappropriate \setuphead[section][ alternative=middle, style=\bfa, sectionsegments=section, % ignore component label ]
\starttext \chapter{Foo} \section{The First Section} Text. \stoptext
How can I keep numeration and title together?
in strc-ren you can see exmaples of definitions; you can either define a macro and hook it in (old method) or use setups in which case you have access to more properties commands like \veryraggedright are low level (often fast) variants of in this case \setupalign[middle,broad] (just use \setupalign if more advanced control is needed) \defineheadalternative [mymiddle] [alternative=horizontal, renderingsetup=head:mymiddle] \startsetups[head:mymiddle] \ruledvbox { \headsetupspacing \veryraggedcenter \begstrut \ifconditional\headshownumber \headnumbercontent \quad \fi \headtextcontent \endstrut } \stopsetups the struts enforce consistent spacing ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (1)
-
Hans Hagen