ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Page Numbers on Outer Edge of Outer Margin
       [not found] <mailman.297.1358004033.2489.ntg-context@ntg.nl>
@ 2013-01-13  0:28 ` Malte Stien
  2013-01-13 10:49   ` Marco Patzer
  0 siblings, 1 reply; 7+ messages in thread
From: Malte Stien @ 2013-01-13  0:28 UTC (permalink / raw)
  To: ntg-context

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 <pragma@wxs.nl>
> To: mailing list for ConTeXt users <ntg-context@ntg.nl>
> Cc: Wolfgang Schuster <wolfgang.schuster@gmail.com>
> 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 <malte@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-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 <wolfgang.schuster@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-736879870306@gmail.com>
> Content-Type: text/plain; charset=us-ascii
> 
> 
> Am 12.01.2013 um 14:49 schrieb Malte Stien <malte@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
> 
> ------------------------------
> 
> Message: 4
> Date: Sat, 12 Jan 2013 15:23:03 +0100
> From: Marco Patzer <homerow@lavabit.com>
> 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: <http://www.ntg.nl/pipermail/ntg-context/attachments/20130112/eae9e4aa/attachment-0001.pgp>
> 
> ------------------------------
> 
> Message: 5
> Date: Sat, 12 Jan 2013 15:31:50 +0100
> From: Wolfgang Schuster <wolfgang.schuster@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: <EB8CABC6-BA91-40CF-A5B8-D17C1B5FC470@gmail.com>
> Content-Type: text/plain; charset=windows-1252
> 
> 
> Am 12.01.2013 um 15:23 schrieb Marco Patzer <homerow@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
> 
> 
> 
> ------------------------------
> 
> Message: 6
> Date: Sat, 12 Jan 2013 12:49:52 -0200
> From: Andre Caldas <andre.em.caldas@gmail.com>
> To: Hans Hagen <pragma@wxs.nl>
> Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
> Subject: Re: [NTG-context] Node for startbuffer.
> Message-ID:
> 	<CADVh14VJYDi2gZ9khbrC_Ws4jKnt2QZwi5dkEDwLhfLP=aaaNw@mail.gmail.com>
> 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 <homerow@lavabit.com>
> 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: <http://www.ntg.nl/pipermail/ntg-context/attachments/20130112/11f853a0/attachment.pgp>
> 
> ------------------------------
> 
> ___________________________________________________________________________________
> 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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Page Numbers on Outer Edge of Outer Margin
  2013-01-13  0:28 ` Page Numbers on Outer Edge of Outer Margin Malte Stien
@ 2013-01-13 10:49   ` Marco Patzer
  0 siblings, 0 replies; 7+ messages in thread
From: Marco Patzer @ 2013-01-13 10:49 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 275 bytes --]

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

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Page Numbers on Outer Edge of Outer Margin
  2013-01-12 14:31   ` Wolfgang Schuster
@ 2013-01-12 15:20     ` Marco Patzer
  0 siblings, 0 replies; 7+ messages in thread
From: Marco Patzer @ 2013-01-12 15:20 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 287 bytes --]

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

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Page Numbers on Outer Edge of Outer Margin
  2013-01-12 14:23 ` Marco Patzer
@ 2013-01-12 14:31   ` Wolfgang Schuster
  2013-01-12 15:20     ` Marco Patzer
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2013-01-12 14:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 12.01.2013 um 15:23 schrieb Marco Patzer <homerow@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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Page Numbers on Outer Edge of Outer Margin
  2013-01-12 13:49 Malte Stien
  2013-01-12 14:13 ` Wolfgang Schuster
@ 2013-01-12 14:23 ` Marco Patzer
  2013-01-12 14:31   ` Wolfgang Schuster
  1 sibling, 1 reply; 7+ messages in thread
From: Marco Patzer @ 2013-01-12 14:23 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 815 bytes --]

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

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Page Numbers on Outer Edge of Outer Margin
  2013-01-12 13:49 Malte Stien
@ 2013-01-12 14:13 ` Wolfgang Schuster
  2013-01-12 14:23 ` Marco Patzer
  1 sibling, 0 replies; 7+ messages in thread
From: Wolfgang Schuster @ 2013-01-12 14:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 12.01.2013 um 14:49 schrieb Malte Stien <malte@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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Page Numbers on Outer Edge of Outer Margin
@ 2013-01-12 13:49 Malte Stien
  2013-01-12 14:13 ` Wolfgang Schuster
  2013-01-12 14:23 ` Marco Patzer
  0 siblings, 2 replies; 7+ messages in thread
From: Malte Stien @ 2013-01-12 13:49 UTC (permalink / raw)
  To: ntg-context

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.

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-01-13 10:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.297.1358004033.2489.ntg-context@ntg.nl>
2013-01-13  0:28 ` Page Numbers on Outer Edge of Outer Margin Malte Stien
2013-01-13 10:49   ` Marco Patzer
2013-01-12 13:49 Malte Stien
2013-01-12 14:13 ` Wolfgang Schuster
2013-01-12 14:23 ` Marco Patzer
2013-01-12 14:31   ` Wolfgang Schuster
2013-01-12 15:20     ` Marco Patzer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).