From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80233 Path: news.gmane.org!not-for-mail From: Malte Stien Newsgroups: gmane.comp.tex.context Subject: Re: Page Numbers on Outer Edge of Outer Margin Date: Sun, 13 Jan 2013 11:28:35 +1100 Message-ID: <03A04AE8-3974-453B-B0DB-A4EA82FDE0B8@stien.de> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1358036932 12441 80.91.229.3 (13 Jan 2013 00:28:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Jan 2013 00:28:52 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sun Jan 13 01:29:10 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TuBRh-0003Nk-VT for gctc-ntg-context-518@m.gmane.org; Sun, 13 Jan 2013 01:29:06 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6243F101E7; Sun, 13 Jan 2013 01:28:49 +0100 (CET) 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 3vANPeqQc4Su; Sun, 13 Jan 2013 01:28:46 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 03BD3101E3; Sun, 13 Jan 2013 01:28:46 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C32AA101E3 for ; Sun, 13 Jan 2013 01:28:44 +0100 (CET) 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 3Up7XTWdNc2R for ; Sun, 13 Jan 2013 01:28:38 +0100 (CET) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 7CEBE101E2 for ; Sun, 13 Jan 2013 01:28:38 +0100 (CET) Original-Received: from homiemail-a33.g.dreamhost.com (caiajhbdcbhh.dreamhost.com [208.97.132.177]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r0D0SZqh027721 for ; Sun, 13 Jan 2013 01:28:36 +0100 Original-Received: from homiemail-a33.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a33.g.dreamhost.com (Postfix) with ESMTP id 4B547594059 for ; Sat, 12 Jan 2013 16:28:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=stien.de; h=content-type :mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; s=stien.de; bh=RjCvRiuPzR1wmh+ZOh50JRNGrfI=; b=HNRGMHAC8Sai1Ygmrk+1IUr6D/i0 qdYHAjjt3Tth5fXlTU5tFZJ6Q/m7eAb+S1aqHlQaHj0vpWxkK9bscs3n8Hdr++lb /F0LUddagn6wKXiRO05iXBkIH/64j8gMeMGrdxahjpKWo+ozAMVLkqv0MTYvdcZr msbmtaJlineK3g8= Original-Received: from [192.168.10.102] (smartw11.lnk.telstra.net [165.228.37.88]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: malte@stien.de) by homiemail-a33.g.dreamhost.com (Postfix) with ESMTPSA id AC54D594058 for ; Sat, 12 Jan 2013 16:28:33 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.1499) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=208.97.132.177; country=US; region=CA; city=Brea; postalcode=92821; latitude=33.9269; longitude=-117.8612; metrocode=803; areacode=714; http://maps.google.com/maps?q=33.9269,-117.8612&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0TILcsAgn - 1fa6399a4bde - 20130113 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:80233 Archived-At: Marco, Thank you, I have opted for your solution as it was the one I most easily understood and it seems to do the job. One thing, though, it turns out the #pageno variable does not seem to work. I had to rename it to #1 to do the trick. Even #p did not work. Do those variables have to be numbers? Here is what worked in the end: \setuppagenumbering[ alternative=doublesided, location={header, margin}, style=bold, command=\PageNumberCommand ] \starttexdefinition PageNumberCommand #1 \doifoddpageelse {\rightaligned{#1}} {\leftaligned{#1}} \stoptexdefinition Thank you again. Malte. On 13/01/2013, at 2:20 AM, ntg-context-request@ntg.nl wrote: > Send ntg-context mailing list submissions to > ntg-context@ntg.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://www.ntg.nl/mailman/listinfo/ntg-context > or, via email, send a message with subject or body 'help' to > ntg-context-request@ntg.nl > > You can reach the person managing the list at > ntg-context-owner@ntg.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of ntg-context digest..." > > > Today's Topics: > > 1. Re: Layer vs. overlay (Hans Hagen) > 2. Page Numbers on Outer Edge of Outer Margin (Malte Stien) > 3. Re: Page Numbers on Outer Edge of Outer Margin (Wolfgang Schuster) > 4. Re: Page Numbers on Outer Edge of Outer Margin (Marco Patzer) > 5. Re: Page Numbers on Outer Edge of Outer Margin (Wolfgang Schuster) > 6. Re: Node for startbuffer. (Andre Caldas) > 7. Re: Page Numbers on Outer Edge of Outer Margin (Marco Patzer) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 12 Jan 2013 14:25:15 +0100 > From: Hans Hagen > To: mailing list for ConTeXt users > Cc: Wolfgang Schuster > Subject: Re: [NTG-context] Layer vs. overlay > Message-ID: <50F1643B.9030402@wxs.nl> > Content-Type: text/plain; charset=windows-1250; format=flowed > > On 1/12/2013 8:44 AM, Wolfgang Schuster wrote: > >> Overlays and Layers are to different mechanism which are powerful when you combine both but first you have to know what each of them does. > >> ... > > perfect explanation > > Hans > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | www.pragma-pod.nl > ----------------------------------------------------------------- > > > ------------------------------ > > Message: 2 > Date: Sun, 13 Jan 2013 00:49:34 +1100 > From: Malte Stien > To: "ntg-context@ntg.nl" > Subject: [NTG-context] Page Numbers on Outer Edge of Outer Margin > Message-ID: <6C558222-1692-4EF6-802D-D9A114ECC7BA@stien.de> > Content-Type: text/plain; charset=us-ascii > > Hi, > > I have a rather wide, 41mm, outer margin in a manual and I am trying to put the page number into the margin like so: > > \setuppagenumbering[ > alternative=doublesided, > location={header, margin}, > style=bold, > ] > > The trouble is that the page number is only a few millimetres wide and gets positioned on the inside edge of my outside margin. Hence, it does not end up close enough to the edge of the page. I guess, I would like to right-align it 4mm from the edge of a right-hand page and left-align it by the same amount from the edge of a left-hand page. Is that doable? > > Thank you, > Malte. > > > > ------------------------------ > > Message: 3 > Date: Sat, 12 Jan 2013 15:13:09 +0100 > From: Wolfgang Schuster > To: mailing list for ConTeXt users > Subject: Re: [NTG-context] Page Numbers on Outer Edge of Outer Margin > Message-ID: <49577A0C-5ABF-4C04-8D83-736879870306@gmail.com> > Content-Type: text/plain; charset=us-ascii > > > Am 12.01.2013 um 14:49 schrieb Malte Stien : > >> Hi, >> >> I have a rather wide, 41mm, outer margin in a manual and I am trying to put the page number into the margin like so: >> >> \setuppagenumbering[ >> alternative=doublesided, >> location={header, margin}, >> style=bold, >> ] >> >> The trouble is that the page number is only a few millimetres wide and gets positioned on the inside edge of my outside margin. Hence, it does not end up close enough to the edge of the page. I guess, I would like to right-align it 4mm from the edge of a right-hand page and left-align it by the same amount from the edge of a left-hand page. Is that doable? > > Method 1: > > \setuppagenumbering[alternative=doublesided,location=] > > \definelayer[pagenumber][doublesided=yes,width=\paperwidth,height=\paperheight] > > \startsetups[pagenumber] > \setlayer[pagenumber][even][preset=lefttop, x=4mm,y=\topspace]{\strut\bf\userpagenumber} > \setlayer[pagenumber][odd] [preset=righttop,x=4mm,y=\topspace]{\strut\bf\userpagenumber} > \stopsetups > > \setupbackgrounds[page][background=pagenumber,setups=pagenumber] > > \starttext \showframe > \dorecurse{10}{\dontleavehmode\page} > \stoptext > > Method 2: > > \setuppagenumbering[alternative=doublesided,location=] > > \setupheadertexts > [margin] > [][\rightaligned{\bf\userpagenumber}] > [\leftaligned{\bf\userpagenumber}][] > > \setupheader[margin][align=outer] > > \starttext \showframe > \dorecurse{10}{\dontleavehmode\page} > \stoptext > > Wolfgang > > ------------------------------ > > Message: 4 > Date: Sat, 12 Jan 2013 15:23:03 +0100 > From: Marco Patzer > To: ntg-context@ntg.nl > Subject: Re: [NTG-context] Page Numbers on Outer Edge of Outer Margin > Message-ID: <20130112142303.GI31752@homerow> > Content-Type: text/plain; charset="utf-8" > > On 2013?01?13 Malte Stien wrote: > >> The trouble is that the page number is only a few millimetres wide >> and gets positioned on the inside edge of my outside margin. >> Hence, it does not end up close enough to the edge of the page. I >> guess, I would like to right-align it 4mm from the edge of a >> right-hand page and left-align it by the same amount from the edge >> of a left-hand page. Is that doable? > > You can use the `command` key to hook in a custom macro which does > the placement. > > \setuppagenumbering > [alternative=doublesided, > location={header, margin}, > style=bold, > command=\PageNumberCommand] > > \starttexdefinition PageNumberCommand #pageno > \signalrightpage > \doifrightpageelse > {\rightaligned{#pageno}} > {\leftaligned{#pageno}} > \stoptexdefinition > > > Marco > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: signature.asc > Type: application/pgp-signature > Size: 490 bytes > Desc: Digital signature > URL: > > ------------------------------ > > Message: 5 > Date: Sat, 12 Jan 2013 15:31:50 +0100 > From: Wolfgang Schuster > To: mailing list for ConTeXt users > Subject: Re: [NTG-context] Page Numbers on Outer Edge of Outer Margin > Message-ID: > Content-Type: text/plain; charset=windows-1252 > > > Am 12.01.2013 um 15:23 schrieb Marco Patzer : > >> On 2013?01?13 Malte Stien wrote: >> >>> The trouble is that the page number is only a few millimetres wide >>> and gets positioned on the inside edge of my outside margin. >>> Hence, it does not end up close enough to the edge of the page. I >>> guess, I would like to right-align it 4mm from the edge of a >>> right-hand page and left-align it by the same amount from the edge >>> of a left-hand page. Is that doable? >> >> You can use the `command` key to hook in a custom macro which does >> the placement. >> >> \setuppagenumbering >> [alternative=doublesided, >> location={header, margin}, >> style=bold, >> command=\PageNumberCommand] >> >> \starttexdefinition PageNumberCommand #pageno >> \signalrightpage >> \doifrightpageelse >> {\rightaligned{#pageno}} >> {\leftaligned{#pageno}} >> \stoptexdefinition >> >> Marco > > When you?re in the header you can just use \doifoddpageelse to set different > values for left/right pages, \signalrightpage is only necessary for text *in* > the document. > > Wolfgang > > > > ------------------------------ > > Message: 6 > Date: Sat, 12 Jan 2013 12:49:52 -0200 > From: Andre Caldas > To: Hans Hagen > Cc: mailing list for ConTeXt users > Subject: Re: [NTG-context] Node for startbuffer. > Message-ID: > > Content-Type: text/plain; charset=UTF-8 > >> I've added the markers code to the beta so that we have an >> abstract way to deal with such matters. >> [...] >> Node lists are processed \hbox \boxmarker{mymarker}{1} {nested from >> [...] > > Does it have to be an "hbox"? > > >> >> It's somewhat experimental. Up to you to update the wiki. > > I've never updated the wiki... I am a bit scared... but I will... :-) > > >> I've added the example to the cld manual. > > How can I see it? > > > Andr? Caldas. > > > ------------------------------ > > Message: 7 > Date: Sat, 12 Jan 2013 16:20:25 +0100 > From: Marco Patzer > To: ntg-context@ntg.nl > Subject: Re: [NTG-context] Page Numbers on Outer Edge of Outer Margin > Message-ID: <20130112152025.GJ31752@homerow> > Content-Type: text/plain; charset="utf-8" > > On 2013?01?12 Wolfgang Schuster wrote: > >> When you?re in the header you can just use \doifoddpageelse to set different >> values for left/right pages, \signalrightpage is only necessary for text *in* >> the document. > > Thanks for the correction. I updated the wiki. > > > Marco > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: signature.asc > Type: application/pgp-signature > Size: 490 bytes > Desc: Digital signature > URL: > > ------------------------------ > > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ > > End of ntg-context Digest, Vol 103, Issue 34 > ******************************************** ___________________________________________________________________________________ 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 ___________________________________________________________________________________