From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/30574 Path: news.gmane.org!not-for-mail From: "Paul Jones" Newsgroups: gmane.comp.tex.context Subject: positioning a watermark Date: Tue, 29 Aug 2006 16:58:57 -0400 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1850469237==" X-Trace: sea.gmane.org 1156885189 31089 80.91.229.2 (29 Aug 2006 20:59:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 29 Aug 2006 20:59:49 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Aug 29 22:59:47 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1GIAgH-0006LO-Kr for gctc-ntg-context-518@m.gmane.org; Tue, 29 Aug 2006 22:59:33 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B205A1FE04; Tue, 29 Aug 2006 22:59:31 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 01705-05-7; Tue, 29 Aug 2006 22:59:23 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2FAAF1FD5E; Tue, 29 Aug 2006 22:59:23 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A993C1FD5E for ; Tue, 29 Aug 2006 22:59:15 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 01705-05-6 for ; Tue, 29 Aug 2006 22:59:00 +0200 (CEST) Original-Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.236]) by ronja.ntg.nl (Postfix) with SMTP id 957051FD55 for ; Tue, 29 Aug 2006 22:58:59 +0200 (CEST) Original-Received: by wr-out-0506.google.com with SMTP id i22so725017wra for ; Tue, 29 Aug 2006 13:58:58 -0700 (PDT) Original-Received: by 10.90.113.18 with SMTP id l18mr8534agc; Tue, 29 Aug 2006 13:58:57 -0700 (PDT) Original-Received: by 10.90.67.7 with HTTP; Tue, 29 Aug 2006 13:58:57 -0700 (PDT) Original-To: "mailing list for ConTeXt users" X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:30574 Archived-At: --===============1850469237== Content-Type: multipart/alternative; boundary="----=_Part_12052_13008471.1156885137799" ------=_Part_12052_13008471.1156885137799 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, I am trying to create alternating watermarks behind the text of a book on odd and even pages. I was able to get this working with overlays fine, except that I could not figure out how to position them. (I would like them in the bottom outside corners) Using layers I could get them to repeat across pages if I \setupbackgrounds[text][text], but only the text on the odd pages showed up. I would really like to use \setupbackgrounds[page] so my offsets are from the edge of the page. So I guess I have a couple of questions. Is it possible to position overlays? Is it possible to repeat layers using [page]? Any guess as to why only the odd pages showed the watermark in the code below? Thanks for any help. paul %output=pdf \setuppagenumbering [alternative=doublesided] \setupcolors [state=start] \setupbackgrounds [text][text] [background=watermark,state=repeat] \definelayer [watermark] [position=yes] \startsetups watermark \doifoddpageelse {\framed[frame=off,foregroundcolor=gray]{\scale[sx=10,sy=10]{\rotate[rotation= 0.0]{forever}}}} {\framed[frame=off,foregroundcolor=gray]{\scale[sx=10,sy=10]{\rotate[rotation= 0.0]{together}}}} \stopsetups \starttext \setlayer[watermark][hoffset=1cm,voffset=1cm]{\setups{watermark}} \chapter{first} \dorecurse{10}{\input tufte } \chapter{second} \dorecurse{10}{\input davis } \chapter{third} \dorecurse{10}{\input zapf } \chapter{fourth} \dorecurse{10}{\input bryson } \stoptext ------=_Part_12052_13008471.1156885137799 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello,

I am trying to create alternating watermarks behind the text of a book on odd and even pages.  I was able to get this working with overlays fine, except that I could not figure out how to position them.  (I would like them in the bottom outside corners)  Using layers I could get them to repeat across pages if I \setupbackgrounds[text][text], but only the text on the odd pages showed up.  I would really like to use \setupbackgrounds[page] so my offsets are from the edge of the page.  So I guess I have a couple of questions.

Is it possible to position overlays?
Is it possible to repeat layers using [page]?
Any guess as to why only the odd pages showed the watermark in the code below?

Thanks for any help.
paul

%output=pdf
\setuppagenumbering
   [alternative=doublesided]

\setupcolors
   [state=start]

\setupbackgrounds
   [text][text]
   [background=watermark,state
=repeat]

\definelayer
   [watermark]
   [position=yes]

\startsetups watermark
         \doifoddpageelse
                {\framed[frame=off,foregroundcolor=gray]{\scale[sx=10,sy=10]{\rotate[rotation=0.0]{forever}}}}
                {\framed[frame=off,foregroundcolor=gray]{\scale[sx=10,sy=10]{\rotate[rotation= 0.0]{together}}}}
\stopsetups
\starttext

\setlayer[watermark][hoffset=1cm,voffset=1cm]{\setups{watermark}}

\chapter{first}  \dorecurse{10}{\input tufte  }
\chapter{second} \dorecurse{10}{\input davis  }
\chapter{third}  \dorecurse{10}{\input zapf   }
\chapter{fourth} \dorecurse{10}{\input bryson }

\stoptext
------=_Part_12052_13008471.1156885137799-- --===============1850469237== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context --===============1850469237==--