Re: [NTG-context] Page Numbers on Outer Edge of Outer Margin

2013-01-13 Thread Marco Patzer
On 2013–01–13 Malte Stien wrote:

 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?

http://wiki.contextgarden.net/MkVI

Marco


signature.asc
Description: Digital signature
___
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
___

Re: [NTG-context] Page Numbers on Outer Edge of Outer Margin

2013-01-12 Thread Wolfgang Schuster

Am 12.01.2013 um 14:49 schrieb Malte Stien ma...@stien.de:

 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
___
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
___


Re: [NTG-context] Page Numbers on Outer Edge of Outer Margin

2013-01-12 Thread 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


signature.asc
Description: Digital signature
___
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
___

Re: [NTG-context] Page Numbers on Outer Edge of Outer Margin

2013-01-12 Thread Wolfgang Schuster

Am 12.01.2013 um 15:23 schrieb Marco Patzer home...@lavabit.com:

 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

___
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
___


Re: [NTG-context] Page Numbers on Outer Edge of Outer Margin

2013-01-12 Thread Marco Patzer
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


signature.asc
Description: Digital signature
___
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
___

Re: [NTG-context] Page Numbers on Outer Edge of Outer Margin

2013-01-12 Thread Malte Stien
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-requ...@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-requ...@ntg.nl
 
 You can reach the person managing the list at
   ntg-context-ow...@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 pra...@wxs.nl
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Cc: Wolfgang Schuster wolfgang.schus...@gmail.com
 Subject: Re: [NTG-context] Layer vs. overlay
 Message-ID: 50f1643b.9030...@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 ma...@stien.de
 To: ntg-context@ntg.nl ntg-context@ntg.nl
 Subject: [NTG-context] Page Numbers on Outer Edge of Outer Margin
 Message-ID: 6c558222-1692-4ef6-802d-d9a114ecc...@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 wolfgang.schus...@gmail.com
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Subject: Re: [NTG-context] Page Numbers on Outer Edge of Outer Margin
 Message-ID: 49577a0c-5abf-4c04-8d83-736879870...@gmail.com
 Content-Type: text/plain; charset=us-ascii
 
 
 Am 12.01.2013 um 14:49 schrieb Malte Stien ma...@stien.de:
 
 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