Re: @ChapterHeadingFormat
Mark Summerfield <[email protected]>
| Newsgroups | gmane.comp.type-setting.lout |
|---|---|
| Organization | Qtrac Ltd. |
| Message-ID | <20101202080434.61664c19@dino> |
On Thu, 2 Dec 2010 07:16:09 +1000 (EST) "David Duffy" <[email protected]> wrote: > On Tue, 30 Nov 2010, Mark Summerfield wrote: > > > I want to set the @ChapterHeadingFormat to produce a 2 line high > > chapter number (just the number, not the word 'Chapter') and then > > the title. > > > > But the 'number' variable always contains the word 'Chapter'. > > > > I know I could get rid of the word by setting @ChapterWord{} but I > > want to use the word 'Chapter' elsewhere (e.g., contents & page > > headers). > > > > Is it possible? And if so, how? > > Fiddle with @MajorNum in bookf (~ line 1167) ??? In the end this was my solution: # book.lout (my copy of book) @ChapterHeadingFormat { title @Case { "Contents" @Yield{title} "Foreword" @Yield{title} "Introduction" @Yield{title} else @Yield{//2.5f} # Make room } } # defs.lout (my defs file) import @BookSetup def @ChapHead right tag { @Place x{{@GlobalInnerMarginX}i}y{top - 0.5i - ysize} { @GlobalPrintablePageWidth @Wide @Tbl marginvertical{0c} break{1fx nohyphen ragged} strut{no} { @Row format{ @Cell font{Bold 108p}marginleft{0c}marginright{.25i}A| @Cell font{Bold 2.5f}marginright{0c}iv{ctr}B} A{@NumberOf{tag}}B{@TitleOf{tag}} } } # Or whatever one wants for the chapter heading } # per chapter @Chapter @Title{The Title} @Tag{the.title} @Begin @ChapHead{the.title} @LP ... -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Programming in Python 3" - ISBN 0321680561 http://www.qtrac.eu/py3book.html