From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/58913 Path: news.gmane.org!not-for-mail From: Otared Kavian Newsgroups: gmane.comp.tex.context Subject: Help wanted for layers and pagebackgrounds Date: Wed, 19 May 2010 18:21:11 +0200 Message-ID: <41EE1BC8-D5A3-4F7A-AE79-674B8E454CE1@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1274286083 19335 80.91.229.12 (19 May 2010 16:21:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 19 May 2010 16:21:23 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed May 19 18:21:21 2010 connect(): No such file or directory Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OEm1J-0008Qb-M7 for gctc-ntg-context-518@m.gmane.org; Wed, 19 May 2010 18:21:21 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A7F4FC9B0D; Wed, 19 May 2010 18:21:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id UjahyROf7VNE; Wed, 19 May 2010 18:21:17 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D10FBC9AF1; Wed, 19 May 2010 18:21:17 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 019E6C9AF1 for ; Wed, 19 May 2010 18:21:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id EpVyi1nUDiNs for ; Wed, 19 May 2010 18:21:14 +0200 (CEST) Original-Received: from mail-ww0-f41.google.com (mail-ww0-f41.google.com [74.125.82.41]) by balder.ntg.nl (Postfix) with ESMTP id E616CC9ADD for ; Wed, 19 May 2010 18:21:14 +0200 (CEST) Original-Received: by wwb18 with SMTP id 18so56516wwb.14 for ; Wed, 19 May 2010 09:21:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:content-type :content-transfer-encoding:subject:date:message-id:to:mime-version :x-mailer; bh=MP/oohqQVYvN5ekRjZUh7CeNlt57vntVqx4I+RdpMaA=; b=s3Z/n2k6pVGTuZH8AqiAHnsUPOtlCz9PxzOUZ9OcM1UC4PwM4G/Ob0IQdLdSJD5WRW O2xNiq9IMPErXOICY/Hx4o8pG9inZlAkCqouq3rh12zUAgOGBJmS4RujWlZBHGGzLpVe WAokwzlKqDU5pek3wWfdMH/hMgoDuV63APK8E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=Zo0G/yNQCWRmdDj4WeM+TXoYaV+D6hMLDl68OYXlORVzV3JI1JplzbN2qkUWqHC+75 J8XrQcItLop87rE621RdxAio6MYwErLFgQBgXYMpZchmbBwZA8Z9kVdaljBX/YpDssN3 LGqV/aUaKgw6pIC0z81dM1/3oDpw8gzJ3wDl4= Original-Received: by 10.216.87.82 with SMTP id x60mr5406434wee.173.1274286074582; Wed, 19 May 2010 09:21:14 -0700 (PDT) Original-Received: from [192.168.1.20] (213.24.85-79.rev.gaoland.net [79.85.24.213]) by mx.google.com with ESMTPS id e82sm3141485wej.16.2010.05.19.09.21.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 19 May 2010 09:21:13 -0700 (PDT) X-Mailer: Apple Mail (2.1078) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:58913 Archived-At: Dear all, I need to have a special layout, in which a number (which is not a page number nor a section number or such) is printed in big size on the right when the pagenumber is even (that is on a leftpage) and printed on the left when the pagenumber is odd (that is a rightpage). With the help of examples gleaned here and there in the manuals, I came up with the following minimal example: %%%% begin \setupcolors[state=start] \setuppagenumbering[location=footer,alternative=doublesided] \definelayer[NumberRight][width=\paperwidth,height=\paperheight] \definelayer[NumberLeft][width=\paperwidth,height=\paperheight] %\showframe \define[1]\myNumber{% \setlayer[NumberRight][preset=righttop,voffset=45mm,hoffset=3mm,reset] % without reset the problem is the same {\offset[location=rt,rightoffset=-3mm] {\tlap{\startcolor[darkgreen] \switchtobodyfont[ss] \scale[height=30mm,width=22mm]{#1} \stopcolor} } } \setlayer[NumberLeft][preset=lefttop,voffset=45mm,hoffset=25mm,reset] % without reset the problem is the same {\offset[location=tl,leftoffset=-3mm] {\tlap{\startcolor[darkgreen] \switchtobodyfont[ss] \scale[height=30mm,width=22mm]{#1} \stopcolor} } } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Maybe the problem is here? \setupbackgrounds[leftpage] [background=NumberRight] \setupbackgrounds[rightpage][background=NumberLeft] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \starttext \dorecurse{4}{\myNumber{#1}\input knuth.tex \page} \dorecurse{4}{\myNumber{#1}\dorecurse{5}{\input knuth.tex }\page} \stoptext %%%%% end The problem is that in some cases (for instance on pages 2, 3, 4 of the above example) the big numbers are overprinted. In particular the behavior seems not to be the same on all pages, that is after the two \dorecurse above. I guess my lack of knowledge in using and setting layers is the cause, but can anyone tell me please what am I doing wrong? This problem arises in a document in which I have to use mkiv, but in mkii one ha the same result. Thanks in advance and best regards: OK ___________________________________________________________________________________ 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 ___________________________________________________________________________________