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

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to