[NTG-context] Linebreak between Chapter Number and Name

Wolfgang Schuster schuster.wolfgang at googlemail.com
Mon Feb 27 08:39:41 CET 2012


Am 27.02.2012 um 02:47 schrieb Rogers, Michael K:

> 
> On Feb 26, 2012, at 7:13 PM, Marc Trius wrote:
> 
>> Hi,
>> I am trying to format a chapter heading so that there is a linebreak between the number and the name. The only way I managed to do this is this:
>> 
>> 
>> \setuphead[
>> chapter][command=\ChapTitle]
>> \def\ChapTitle#1#2%
>> {\framed[height=2cm,width=broad]{#1\\#2}
>> }
> 
> 
> This worked for me:
> 
> \def\ChapTitle#1#2{\framed{\vbox{\startalignment[center]#1\par#2\stopalignment}}}

\define[2]\ChapTitle
  {\framed[width=broad,align=middle]{#1\\#2}}

> I don't know if \vbox's are frowned on in ConTeXt, but my fix doesn't work if you remove it.  I've just started migrating from Plain Tex to ConTeXt, so please excuse a naive response. 

Special layouts for the headings requires sometimes \vbox and \hbox but in this case you don’t need it.

Wolfgang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20120227/cd857e9d/attachment-0001.html>


More information about the ntg-context mailing list