From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/82765 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Centered title with numeration on the same line Date: Wed, 05 Jun 2013 09:34:44 +0200 Message-ID: <51AEEA14.3090401@wxs.nl> References: <00ac01ce607b$773e0440$65ba0cc0$@tosovsky@tiscali.cz> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1370417742 22590 80.91.229.3 (5 Jun 2013 07:35:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Jun 2013 07:35:42 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Wed Jun 05 09:35:41 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Uk8Fx-0008JW-MC for gctc-ntg-context-518@m.gmane.org; Wed, 05 Jun 2013 09:35:41 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3F487101E9; Wed, 5 Jun 2013 09:35:41 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5Yze1APqqe7I; Wed, 5 Jun 2013 09:35:39 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 0ADCF101E4; Wed, 5 Jun 2013 09:35:39 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C768A101E4 for ; Wed, 5 Jun 2013 09:35:36 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RJ7ocYDjxZ8Z for ; Wed, 5 Jun 2013 09:35:31 +0200 (CEST) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id 90F51101E0 for ; Wed, 5 Jun 2013 09:35:21 +0200 (CEST) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r557ZKkK017010 for ; Wed, 5 Jun 2013 09:35:20 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.103; Original-Received: from [10.100.1.103] (unverified [10.100.1.103]) by pragma-net.nl (SurgeMail 6.3c2) with ESMTP id 6468-1713362 for ; Wed, 05 Jun 2013 09:35:20 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 In-Reply-To: <00ac01ce607b$773e0440$65ba0cc0$@tosovsky@tiscali.cz> X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=15; city=Zwolle; latitude=52.5058; longitude=6.0858; http://maps.google.com/maps?q=52.5058,6.0858&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0NJIvzks5 - fb0a60d8e1f4 - 20130605 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:82765 Archived-At: 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 ___________________________________________________________________________________