ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: backgrounds
Date: Wed, 15 Oct 2014 10:33:28 +0200	[thread overview]
Message-ID: <543E3158.4060600@wxs.nl> (raw)

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
-----------------------------------------------------------------
___________________________________________________________________________________
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-15  8:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-15  8:33 Hans Hagen [this message]
2014-10-17 11:32 ` backgrounds Procházka Lukáš Ing. - Pontex s. r. o.
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=543E3158.4060600@wxs.nl \
    --to=pragma@wxs.nl \
    --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).