Stretching chapter titles - MKII
Follows is some code that executes. The lines immediately following \starttext create a sample of the desired output format. However, I want to accomplish similar results for chapter titles via the passing of arguments containing the chapter title and number. Numerous attempts at that have resulted in abject failure. I am clearly missing something. \def\MyChapterCommand#1#2 {\switchtobodyfont[ss,30pt] \hbox to \hsize {\stretched{Chapter\\One}} \blank[small] \switchtobodyfont[sansbold,20pt] \hbox to \hsize {\stretched{It\\Was\\The\\Best\\Of\\Times}}} \setuphead[chapter] [command=\MyChapterCommand, header=empty,footer=chapter,page=mychapterpagebreak, after={\blank[0.5in]},before={\blank[force,1.0in]}] \starttext \switchtobodyfont[sans,30pt] \hbox to \hsize {\stretched{Chapter\\One}} \blank[small] \switchtobodyfont[sansbold,20pt] \hbox to \hsize {\stretched{It\\Was\\The\\Best\\Of\\Times}} \chapter{It\\Was\\The\\Best\\Of\\Times} \input knuth \stoptext Tom Benjey 717-258-9733 voice 717-243-0074 fax blog: www.TomBenjey.com
On 15-2-2011 1:45, Tom wrote:
Follows is some code that executes. The lines immediately following \starttext create a sample of the desired output format. However, I want to accomplish similar results for chapter titles via the passing of arguments containing the chapter title and number. Numerous attempts at that have resulted in abject failure. I am clearly missing something.
\def\MyChapterCommand#1#2 {\switchtobodyfont[ss,30pt] \hbox to \hsize {\stretched{Chapter\\One}} \blank[small] \switchtobodyfont[sansbold,20pt] \hbox to \hsize {\stretched{It\\Was\\The\\Best\\Of\\Times}}}
\setuphead[chapter] [command=\MyChapterCommand, header=empty,footer=chapter,page=mychapterpagebreak, after={\blank[0.5in]},before={\blank[force,1.0in]}]
\starttext \switchtobodyfont[sans,30pt] \hbox to \hsize {\stretched{Chapter\\One}} \blank[small] \switchtobodyfont[sansbold,20pt] \hbox to \hsize {\stretched{It\\Was\\The\\Best\\Of\\Times}}
\chapter{It\\Was\\The\\Best\\Of\\Times} \input knuth \stoptext
you can try deepcommand=\stretched but as this macro does parsing and lots of things can happen in titles there are no guarantees Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Am 15.02.2011 um 01:45 schrieb Tom:
Follows is some code that executes. The lines immediately following \starttext create a sample of the desired output format. However, I want to accomplish similar results for chapter titles via the passing of arguments containing the chapter title and number. Numerous attempts at that have resulted in abject failure. I am clearly missing something.
Can’t you use MkIV, it has better support for tracking? Wolfgang
participants (3)
-
Hans Hagen
-
Tom
-
Wolfgang Schuster