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