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

Reply via email to