From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/47167 Path: news.gmane.org!not-for-mail From: Michael Bynum Newsgroups: gmane.comp.tex.context Subject: Re: Page number not updating in layer Date: Tue, 3 Feb 2009 10:36:23 -0500 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1233675511 5764 80.91.229.12 (3 Feb 2009 15:38:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Feb 2009 15:38:31 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Feb 03 16:39:44 2009 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 lo.gmane.org with esmtp (Exim 4.50) id 1LUNNB-0001AP-2C for gctc-ntg-context-518@m.gmane.org; Tue, 03 Feb 2009 16:39:37 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2A0C81FC1A; Tue, 3 Feb 2009 16:38:16 +0100 (CET) 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 18800-02; Tue, 3 Feb 2009 16:37:08 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A05251FBB8; Tue, 3 Feb 2009 16:37:08 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4A7751FBB8 for ; Tue, 3 Feb 2009 16:37:07 +0100 (CET) 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 16182-02 for ; Tue, 3 Feb 2009 16:36:28 +0100 (CET) Original-Received: from filter1-nij.mf.surf.net (filter1-nij.mf.surf.net [195.169.124.152]) by ronja.ntg.nl (Postfix) with ESMTP id E93921FB89 for ; Tue, 3 Feb 2009 16:36:28 +0100 (CET) Original-Received: from rv-out-0708.google.com (rv-out-0708.google.com [209.85.198.250]) by filter1-nij.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n13FaOOP005141 for ; Tue, 3 Feb 2009 16:36:27 +0100 Original-Received: by rv-out-0708.google.com with SMTP id f25so2106587rvb.14 for ; Tue, 03 Feb 2009 07:36:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=ypMRb5kuMpVgkx6Ai4nOy+pKrPql2VAWz3o8Ej5ar2w=; b=EvXbEC4faW51iT6R7F569LQI8RMrXpI37fpLmVkFCMG0YnBhx1nPudtE6r/sno7Fkt Mn4+omli6PFaqOZg++fsRW3zYJ6wl/Kk1aaS1rHMO6fuM9Hk30HfpQlr6IMG9gfplXtV 9WB/4cLiRHEhRVWsXTN5P5QzuPl/YYm2AOqxo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Jgq9Ax2sRzD9kZaWuvYu+cq6NmVQrqOkMb1pExz2hmv5xw39WQ/B/AFVAPdAn55+ar l1vUcqcIi988t0MJC/KnLD0dV9T2wLrpoWIm+V2JP6bTf0+PDRmo1bq8x6tU+7zCfVuN X4QGkRum302ZOvurUPNDEvqKaNK3HPTkWVANM= Original-Received: by 10.141.195.5 with SMTP id x5mr1066806rvp.168.1233675383789; Tue, 03 Feb 2009 07:36:23 -0800 (PST) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.198.250; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 174419103 - a6a87dfb68e9 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.152 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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:47167 Archived-At: Great that fixed it. Sorry about the subject by the way. I thought it would auto add the mailing list prefix. I still can't get the total number of pages to work out right if I have a title page. I used standardmakeup to keep the title page from being numbered, but it is still counted in \totalnumberofpages. \definelayer[headerfooter][width=\paperwidth,height=\paperheight] \startsetups layer \setlayer[headerfooter][preset=lefttop,x=4in,y=1in]% {\framed[frame=off,width=1.25in,align=middle,offset=none]{\tfd Page~ \pagenumber~of~\totalnumberofpages}} \stopsetups \starttext \startstandardmakeup \tfd THIS IS A TITLE PAGE \page \stopstandardmakeup \setupbackgrounds[page][setups=layer,background={headerfooter}] \dorecurse{2}{\page[empty]} \stoptext Mike On Tue, Feb 3, 2009 at 4:36 AM, Wolfgang Schuster wrote: > > Am 03.02.2009 um 07:50 schrieb Michael Bynum: > >> I am trying to use a layer to insert a page number in my document, but >> the page always displays page number 1. It seems nothing that I have >> tried has worked. I also don't know how to exclude the first page >> from the total number of pages count. Here is the code I'm trying to >> use. > > > You can find a solution from Aditya under the following link: > > http://archive.contextgarden.net/message/20070714.145156.91a20ef2.en.html > > I wrote also for myself a short test file for myself a while ago. > > \definelayer[head] [width=\paperwidth,height=\paperheight] > \definelayer[nexthead][width=\paperwidth,height=\paperheight] > > \startsetups layer > > \doif {\pagenumber}{1}{\setlayer[head] [offset=2cm]{First page}} > \doifnot{\pagenumber}{1}{\setlayer[nexthead][offset=2cm]{Page \pagenumber}} > > \stopsetups > > \setupbackgrounds[page][setups=layer,background={head,nexthead}] > > \starttext > \dorecurse{4}{\page[empty]} > \stoptext > > Wolfgang > > ___________________________________________________________________________________ > 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 : https://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ > ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________