On Sun, May 24, 2009 at 4:00 PM, Wolfgang Schuster
Am 24.05.2009 um 06:12 schrieb Zhichu Chen:
As you said before, in my problem, this kind of handler could break something like hyper-links, and I assume Yue wanted those kind of stuffs.
I don't think this is a problem for this example because the page dimension are always the same while in the code for you the real and the calculated coordinates are different.
Maybe just a \start(stop)setups which changes the background back to normal and \prependtoks it to some token list. So is there an \everypage or \everyshipout token? Then using \setuphead (I don't know if it's appropriate) or \appendtoks to every title page.
I posted a code to enable/disable the backgroundcolor for certain pages not so long ago, take a look in the mail archive.
Found it. Well, then it's just as easy as it sounds: \unprotect \let\!!savedbackgroundcolor\empty \def\onbackground {\globallet\@@mapagebackgroundcolor\!!savedbackgroundcolor} \def\offbackground {\globallet\!!savedbackgroundcolor\@@mapagebackgroundcolor \globalletempty\@@mapagebackgroundcolor} \def\nobackground {\globallet\@@mapagebackgroundcolor\!!savedbackgroundcolor \globalletempty\@@mapagebackgroundcolor \appendtoks\globallet\@@mapagebackgroundcolor\!!savedbackgroundcolor\to\afterpage} \def\gobackground {\globallet\@@mapagebackgroundcolor\!!savedbackgroundcolor \appendtoks\globalletempty\@@mapagebackgroundcolor\to\afterpage} \protect \setuphead [chapter] [before=\gobackground] \setupcolors[state=start] \setupbackgrounds[page][background=color,backgroundcolor=lightgray]\offbackground \starttext \chapter{hello} \dorecurse{10}{\input zapf\par} \chapter{hello} \dorecurse{10}{\input zapf\par} \chapter{hello} \dorecurse{10}{\input zapf\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 ___________________________________________________________________________________
-- Best Regards Chen ---------------------------------------------------------------- Zhi-chu Chen | Shanghai Synchrotron Radiation Facility No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China tel: 086 21 5955 3405 | zhichu.chen.googlepages.com | www.sinap.ac.cn ----------------------------------------------------------------