[NTG-context] [***SPAM***] Resetting Page Backgrounds
adityam at umich.edu
Thu Apr 19 20:08:14 CEST 2012
On Wed, 18 Apr 2012, Raymond LeClair wrote:
> I have written Python classes to automate reading a Tumblr blog and writing a file for processing by ConTeXt. No manual editing of the ConTeXt input file is allowed.
> Photos are incorporated in a graphic created using METAPOST commands embedded in the ConTeXt input file. Then the graphic is used as a background. I need this background to appear only on one page.
> My current solution is to use TeX conditionals to test if the page
> number has incremented, then reset the background to empty. This
> approach fails in many cases. The code below provides a minimum working
> example of a failure. Photos are shown as squares to reduce the size of
> this post.
> Is there a better way to reset the background?
Use can use layers with state=reset, which automatically reset after each
fill Page withcolor 0.25[blue,white];
fill Page withcolor 0.25[green,white];
More information about the ntg-context