# 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)
alternative=middle,
style=\bfc,
conversion=Romannumerals,
numbercommand=\groupedcommand{\cap}{\blank[0.5cm]},
after={\blank[1cm]},
]

% for section it is inappropriate
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)

[mymiddle]
[alternative=horizontal,

\ruledvbox {
\veryraggedcenter
\begstrut
\fi
\endstrut
}
\stopsetups

the struts enforce consistent spacing

-----------------------------------------------------------------
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
-----------------------------------------------------------------
___________________________________________________________________________________