Hi, new in next beta %D Sometimes you have a document wide (page) background but need to overload it %D locally. In such case (at least in my experience) the only values that get set %D are the background and backgroundcolor (if set at all). A full inheritance chain %D would complicate things because then we need to use named backgrounds which in %D turn will make this mechanism slower. I considered independent local backgrounds %D but that also complicates the code (not that much) but isolation means that we %D need to set more parameters each time. The following simple approach proabbly %D suits most usage. \starttext \setupbackgrounds[page][background=color,backgroundcolor=red] \input tufte \page \setupbackgrounds[page][background=,backgroundcolor=] \input tufte \page \setupbackgrounds[page][background=color,backgroundcolor=red] \input tufte \page \pushbackground[page] \setupbackgrounds[page][background=color,backgroundcolor=green] \input tufte \page \popbackground \input tufte \page \stoptext (only two parameters pushed/popped) -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Source & result attached.
On Wed, 15 Oct 2014 10:33:28 +0200, Hans Hagen
Hi,
new in next beta
%D Sometimes you have a document wide (page) background but need to overload it %D locally. In such case (at least in my experience) the only values that get set %D are the background and backgroundcolor (if set at all). A full inheritance chain %D would complicate things because then we need to use named backgrounds which in %D turn will make this mechanism slower. I considered independent local backgrounds %D but that also complicates the code (not that much) but isolation means that we %D need to set more parameters each time. The following simple approach proabbly %D suits most usage.
\starttext
\setupbackgrounds[page][background=color,backgroundcolor=red] \input tufte \page \setupbackgrounds[page][background=,backgroundcolor=] \input tufte \page \setupbackgrounds[page][background=color,backgroundcolor=red] \input tufte \page \pushbackground[page] \setupbackgrounds[page][background=color,backgroundcolor=green] \input tufte \page \popbackground \input tufte \page
\stoptext
(only two parameters pushed/popped)
-- Ing. Lukáš Procházka | mailto:LPr@pontex.cz Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038
On Mon, 20 Oct 2014 03:46:39 +0200, Hongwen Qiu
在 2014年10月17日 19:32, Procházka Lukáš Ing. - Pontex s. r. o. 写道:
Source & result attached. I didn't expect your source even to compile since you missed out the \starttext thing.
- I succeeded to compile... Of course, the code must contain \starttext, so re-attaching... -- Ing. Lukáš Procházka | mailto:LPr@pontex.cz Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038
participants (3)
-
Hans Hagen
-
Hongwen Qiu
-
Procházka Lukáš Ing. - Pontex s. r. o.