Am 21.05.2009 um 03:25 schrieb Yue Wang:
Hi,
I have a new book to design, but I don't know how to do page/content conditional processing). Please help me:)
- I want my chapter page (first page of each chapter) to be really distinctive. that is, I define a dark color background, and want all the text on the first page set in white. how can I do that? for example \chapter{hello} \dorecurse{10}{\input zapf } % all the characters in the first page should white, others should set in black.
Took me a while but with the help of the MkII/IV manual I was able to implement the chapter layout. \enableattributeinheritance \newif\ifchapterpage \installpagehandler{color}% {\dowithnextbox {\ifchapterpage \actualshipout {\framed[background=color,backgroundcolor=black,foregroundcolor=white] {\attributedbox\nextbox}} \else \actualshipout{\flushnextbox} \fi\global\chapterpagefalse} \normalhbox} \starttext \setuppaper[method=color] \subject{Tufte}\chapterpagetrue \dorecurse{10}{\input tufte\par} \page \setuppaper[method=color] \subject{Knuth}\chapterpagetrue \dorecurse{10}{\input knuth\par} \stoptext Wolfgang