[NTG-context] Setting up chapter.

luigi.scarso luigi.scarso at logosrl.it
Tue Jul 12 15:15:16 CEST 2005

John R. Culleton wrote:

>On Monday 11 July 2005 09:34 pm, Stuart Jansen wrote:
>
>
>>On Mon, 2005-07-11 at 17:12 +0000, John R. Culleton wrote:
>>
>>
>>>I am trying to set up chapter heads a certain way and my code
>>>keeps getting uglier. Here are the specs:
>>>
>>>1. Chapter number centered, with decorations on either side.
>>>2. Chapter title centered below chapter number.
>>>3. Additional decoration centered below chapter title.
>>>4. Both number and text show up in TOC in normal Context manner.
>>>
>>>Can this be done easily using the normal chapter macro or should
>>>I do it all from scratch? (If I roll my own I worry about getting
>>>info to the TOC.)
>>>
>>>
>>I am doing something like that now. Sorry the example isn't very pretty,
>>had to rip out parts that were specific to the font I'm using, but
>>should give you an idea of what you need to do.
>>
>>=====
>>
>>
>RTFM, I came up with this configuration:
>
>
>\def\numcommand#1{\hfil\webo m\hfil\tfd#1\hfil\webo m\hfil\break}
>
>\def\texcommand#1{\hfil #1 \hfil\crlf\deco}
>
>
>My problem remains with the horizontal alignment of the chapter
>text. I have tried left, right, normal, broad. All I want to do
>is center it, per my specification 2 above.
>
>Webo is the webomints dingbat font.
>
>

\def\Command#1#2{\ruledvbox{\hbox to \textwidth{\hfill #1 \hfill}\\%
\hbox to \textwidth{\hfill #2 \hfill}\\%
\hbox to \textwidth{\hfill deco! \hfill}}}

\def\NCommand#1{\framed{#1}}% Insert here other stuff for decorate number

\def\TCommand#1{\framed{#1}}% Insert here other stuff for decorate text