Background for current page only
How to set a background for the current page only? \setupbackgrounds sets backgrounds for all pages, I don't seem to find a way to turn it on/off for certain pages (\setupbackgrounds[state=start/stop] has no effect). Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
Khaled Hosny wrote:
How to set a background for the current page only? \setupbackgrounds sets backgrounds for all pages, I don't seem to find a way to turn it on/off for certain pages (\setupbackgrounds[state=start/stop] has no effect).
state=start|stop|repeat by default the one for the page is repeat \setupbackgrounds[page][state=...] \setupbackgrounds[leftpage][state=...] \setupbackgrounds[rightpage][state=...] etc ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Fri, Apr 03, 2009 at 11:19:07PM +0200, Hans Hagen wrote:
Khaled Hosny wrote:
How to set a background for the current page only? \setupbackgrounds sets backgrounds for all pages, I don't seem to find a way to turn it on/off for certain pages (\setupbackgrounds[state=start/stop] has no effect).
state=start|stop|repeat
by default the one for the page is repeat
\setupbackgrounds[page][state=...] \setupbackgrounds[leftpage][state=...] \setupbackgrounds[rightpage][state=...]
etc
I think I missing something here, in the following example I expect the 2nd page (and any subsequent page) not to have a background, but that is not what I get. I tried every combination of state=start|stop|repeat, but nothing seem to change at all. \setupcolors[state=start] \setupbackgrounds[page][background=color,backgroundcolor=lightgray] \starttext \setupbackgrounds[page][state=start] \input tufte \page \setupbackgrounds[page][state=stop] \input tufte \stoptext Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
Am 03.04.2009 um 22:54 schrieb Khaled Hosny:
How to set a background for the current page only? \setupbackgrounds sets backgrounds for all pages, I don't seem to find a way to turn it on/off for certain pages (\setupbackgrounds[state=start/stop] has no effect).
Tricky thing, here is a (not so) quick and dirty solution. \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 \setupcolors[state=start] \setupbackgrounds[page][background=color,backgroundcolor=lightgray] \offbackground \starttext \input tufte \page \gobackground \input tufte \page \input tufte \stoptext Wolfgang
On Sat, Apr 04, 2009 at 10:45:09AM +0200, Wolfgang Schuster wrote:
Am 03.04.2009 um 22:54 schrieb Khaled Hosny:
How to set a background for the current page only? \setupbackgrounds sets backgrounds for all pages, I don't seem to find a way to turn it on/off for certain pages (\setupbackgrounds[state=start/stop] has no effect).
Tricky thing, here is a (not so) quick and dirty solution.
Thanks, that was of great help! Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
participants (3)
-
Hans Hagen
-
Khaled Hosny
-
Wolfgang Schuster