Alternating backgrounds and repeating layers

From ConTeXt wiki
Revision as of 13:33, 6 November 2006 by Shagreel (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
\setuppagenumbering
 [alternative=doublesided]

\setupcolors
 [state=start]

\setupbackgrounds
 [leftpage]
 [background=Watermark-Left]

\setupbackgrounds
 [rightpage]
 [background=Watermark-Right]

\definelayer
 [Watermark-Left]
 [repeat=yes,
  width=\paperwidth,
  height=\paperheight]

\definelayer
 [Watermark-Right]
 [repeat=yes,
  width=\paperwidth,
  height=\paperheight]

\setlayerframed
 [Watermark-Left]
 [preset=middle]
 [foregroundcolor=gray]
 {\scale[sx=12,sy=12]{\rotate[rotation=20.0]{left page watermark}}}

\setlayerframed
 [Watermark-Right]
 [preset=middle]
 [foregroundcolor=gray]
 {\scale[sx=12,sy=12]{\rotate[rotation=-20.0]{right page watermark}}}

\starttext
   \chapter{first}  \dorecurse{30}{\input tufte  }
\stoptext