[NTG-context] Setting up chapter.

John R. Culleton john at wexfordpress.com
Wed Jul 13 19:37:35 CEST 2005


On Tuesday 12 July 2005 04:31 pm, John R. Culleton wrote:
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> But when time permits I will play with the other approaches
> mentioned.

Necessity overtook schedule. So I used the Jensen approach
(thanks) modified as recommended by Kavian (thanks) with a few
minor changes to suit my application. Herewith the final
product:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\numcommand#1{\hfil\webo m\tfd#1\webo m \hfil}
%\unexpanded\def\chaptercase{\uppercase}

\def\mychapter#1#2%
{\setupframed[width=\textwidth,align=middle,frame=off]\vbox{%
 \framed{\setupbodyfont[18pt]\setupinterlinespace[height=.1,depth=0]
#1}%
\framed{\setupbodyfont[15pt]\setupinterlinespace[line=2ex]#2\par}%
\deco\par}}

\setuphead[chapter][numbercommand=\numcommand,page=right,
header=high,
  command=\mychapter,%textcommand=\chaptercase,
   textstyle=\sl,numberstyle=\bf]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I kept the unused \chaptercase definition around just in case I
change my mind later on. 

This has been educational. Who says you can't teach an old dog
new tricks? 

-- 
John Culleton
Books with answers to marketing and publishing questions:
http://wexfordpress.com/tex/shortlist.pdf

Book coaches, consultants and packagers:
http://wexfordpress.com/tex/packagers.pdf



More information about the ntg-context mailing list