At 09:10 PM 2/14/2003 +0800, you wrote:
For all you propeller-heads that like to see bad code here's my
chapter heading setup:

--------------------------------------------------

%output=pdf

%% chapter head layout
\setupcolors[state=start]
\setuplist[section]
          [style=boldslanted,
           align=right,
           interaction=all,
           symbol=1,
           width=0.5em,
           pagenumber=no,
           before=,
           after=]
\setuphead[chapter]
          [header=empty,
           numberstyle=ChapterTitleNumberFont,
           textstyle=ChapterTitleTextFont
           alternative=command,
           command=\ContentsHead,
           page=right,
           after={\blank[2*big]}]
\definefont[ChapterTitleTextFont][Serif at 24.9pt]
\definefont[ChapterTitleNumberFont][SerifBold at 40pt]
\def\ContentsHead#1#2%
  {\setupframed[frame=off]
                          ^ add % here to prevent spurious space

   \framed[width=\hsize,offset=overlay]
     {\placesidebyside
        {\doifelsenothing{#1}
or        \doifmodeelse{*sectionnumber}

           {\framed [width=.6\hsize]{}} % dummy
           {\framed [width=.6\hsize,offset=1em,strut=no,align=right,
                     background=screen]
              {\vi In this chapter: \blank
                 \placelist[section][criterium=chapter]}}}
        {\framed [width=.4\hsize,strut=no,align=left]
                    %% Typeset Chapter Number
                    {\hbox{\vbox to 24.9pt{% height ChapterTitleTextFont
                          \vss
                          #1}}}
           \vfilll}
     }%
   %% Typeset Chapter Title
   \llap{\lower24.9pt\hbox{#2\hskip0.5em}}}

\showmakeup
i didn't look how it looks (so i will not comment on that)

about bad code: you will always need some low level coding to achieve certain effects; also the code does not look that bad -)

Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
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
-------------------------------------------------------------------------
information: http://www.pragma-ade.com/roadmap.pdf
documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to