Re: [NTG-context] Background for current page only
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 signature.asc Description: Digital signature ___ 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 ___
Re: [NTG-context] Background for current page only
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 ___ 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 ___
Re: [NTG-context] Background for current page only
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 bck.pdf Description: Adobe PDF document \setupcolors[state=start] \setupbackgrounds[page][background=color,backgroundcolor=lightgray,state=repeat] \starttext \setupbackgrounds[page][state=start] \input tufte \page \setupbackgrounds[page][state=stop] \input tufte \stoptext signature.asc Description: Digital signature ___ 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 ___
Re: [NTG-context] Background for current page only
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 - ___ 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 ___
[NTG-context] 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 signature.asc Description: Digital signature ___ 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 ___