From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/2869 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: redefining chapter (etc) appearence Date: Thu, 05 Oct 2000 09:57:46 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <3.0.6.32.20001005095746.01222320@pop.wxs.nl> References: <00e801c02e44$1c772cc0$ac430e97@nuovo> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: main.gmane.org 1035393643 12414 80.91.224.250 (23 Oct 2002 17:20:43 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 17:20:43 +0000 (UTC) Cc: "ConTeXt" Original-To: "Giuseppe Bilotta" In-Reply-To: <00e801c02e44$1c772cc0$ac430e97@nuovo> Xref: main.gmane.org gmane.comp.tex.context:2869 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:2869 At 10:41 PM 10/4/00 +0200, Giuseppe Bilotta wrote: >Hello, > >I'm just beginning with ConTeXt, and thus I tried to do a thing that in >LaTeX was very easy to do (using an appropriate package blah blah blah): >redefining the appearence of the sectioning commands. More precisely, I want >them to appear like > > Chapter > > > > >both being centered horizontally, with appropriate spacing, "Chapter >" in small caps, \tfa (I use "real" small caps, and they seem to >work properly :->), and written in bolf, \tfb. So I tried > >\def\ChapterHead#1#2{{\tfa \cap{Chapter #1}}\crlf{\tfb \bf #2}} > >(left the centering for the second step), without luck: \crlf doesn't (seem >to) work, the chapter number is too big (even with {{\tfa\cap{Chapter}}#1}), >and the chapter title is not boldfaced. So > >1) how do I make the "newline" with appropriate spacing? I did it in a >second experiment by \hboxing the contents; is there some other way? >2) how do I get a properly dimensioned chapter number? >3) how do I get the proper font to the chapter title? >4) (since we're at it) how do I center it all? \def\ChapterHead#1#2{\vbox{#1\vskip12pt#1}} % you may add: \raggedcenter \setuphead [chapter] [command=\ChapterHead, allign=middle, numberstyle=\bfa, textstyle=\tfa] \setuplabeltext[en][chapter=Chapter ] % given that your main language is en So, fonts are passed automatically, and you should use a \vbox. Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com -------------------------------------------------------------------------