[NTG-context] backgrounds

Procházka Lukáš Ing. - Pontex s. r. o. LPr at pontex.cz
Fri Oct 17 13:32:49 CEST 2014


Source & result attached.

On Wed, 15 Oct 2014 10:33:28 +0200, Hans Hagen <pragma at wxs.nl> wrote:

> 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 at pontex.cz
Pontex s. r. o.      | mailto:pontex at pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bkgs.mkiv
Type: application/octet-stream
Size: 475 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20141017/2e3157a0/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bkgs.pdf
Type: application/pdf
Size: 6061 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20141017/2e3157a0/attachment.pdf>


More information about the ntg-context mailing list