\define[1]\ChapterTextStretch  {\line{\stretched{#1}}}
\define[1]\ChapterNumberStretch{\determineheadnumber[chapter]\ChapterTextStr
etch{Chapter 
\currentheadnumber}}

\setuphead
   [chapter]
   [alternative=middle,
    textstyle=sansbold,
    numberstyle=sans,
    deeptextcommand=\ChapterTextStretch,
    deepnumbercommand=\ChapterNumberStretch]

\starttext
\chapter{Test Chapter Title}
\input knuth
\stoptext

Wolfgang

I've tried to modify this code to change the chapter numbers to words. That
part was successful but the above code only stretches the word "Chapter" but
not the numbers' words. I also get errors when I try to get all caps by
inserting \WORD in the first command.

\input c:/BookLayouts/MyFirstBook/Macros/numstr.tex

\define[1]\ChapterTextStretch  {\line{\stretched{#1}}} 

\define[1]\ChapterNumberStretch
{\ChapterTextStretch{Chapter\ChapterNumberWords}}

\define[1]\ChapterNumberWords
{\determineheadnumber[chapter]\numstr{\currentheadnumber}}

\setuphead
   [chapter]
   [alternative=middle,
    textstyle=sansbold,
    numberstyle=sans,
    deeptextcommand=\ChapterTextStretch,
    deepnumbercommand=\ChapterNumberStretch]

\starttext
\completecontent
\chapter{Test Chapter Title}
\input knuth
\chapter{Test Chapter With Very Long Title That Might Overflow Page}
\input knuth
\chapter{Test Chapter With Long Title Doesn't Overflow}
\input knuth
\stoptext

Tom


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to