ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Procházka Lukáš Ing. - Pontex s. r. o." <LPr@pontex.cz>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: backgrounds
Date: Fri, 17 Oct 2014 13:32:49 +0200	[thread overview]
Message-ID: <op.xnvg0zhutpjj8f@lpr> (raw)
In-Reply-To: <543E3158.4060600@wxs.nl>

[-- Attachment #1: Type: text/plain, Size: 1570 bytes --]

Source & result attached.

On Wed, 15 Oct 2014 10:33:28 +0200, Hans Hagen <pragma@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@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

[-- Attachment #2: Bkgs.mkiv --]
[-- Type: application/octet-stream, Size: 475 bytes --]

\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

[-- Attachment #3: Bkgs.pdf --]
[-- Type: application/pdf, Size: 6061 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2014-10-17 11:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-15  8:33 backgrounds Hans Hagen
2014-10-17 11:32 ` Procházka Lukáš Ing. - Pontex s. r. o. [this message]
2014-10-20  1:46   ` backgrounds Hongwen Qiu
2014-10-20  8:17     ` backgrounds Procházka Lukáš Ing. - Pontex s. r. o.
  -- strict thread matches above, loose matches on Subject: below --
2004-10-18 10:57 backgrounds gmorais
2004-10-18 11:20 ` backgrounds Hans Hagen
2003-11-03 17:28 backgrounds Pawel Jackowski na Onet
2003-11-10 16:49 ` backgrounds Patrick Gundlach
2003-04-10 20:00 Re[2]: Backgrounds Hans Hagen
2003-03-25  8:46 Hans Hagen
2003-03-25 12:25 ` Re[3]: Backgrounds Hans Hagen
2003-03-25 14:36   ` Re[4]: Backgrounds Giuseppe Bilotta
2003-04-09 14:52     ` Backgrounds Patrick Gundlach
2003-04-09 16:57       ` Re[2]: Backgrounds Giuseppe Bilotta
2003-04-10  9:50         ` Backgrounds Patrick Gundlach
2003-04-18 14:33           ` Backgrounds Johannes Hüsing
2003-04-19 13:35             ` Backgrounds Patrick Gundlach
2003-04-11 16:02     ` Re[3]: Backgrounds Hans Hagen
2003-04-11 16:21       ` Backgrounds Patrick Gundlach
2003-03-24 14:37 Backgrounds Giuseppe Bilotta
2003-03-24 16:45 ` Backgrounds Hans Hagen
2000-06-09 10:35 Backgrounds Anders Alstrin
2000-06-09 16:17 ` Backgrounds Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=op.xnvg0zhutpjj8f@lpr \
    --to=lpr@pontex.cz \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).