Pagenumber in outer margin
Hi everyone! The last time I wrote an email to this list was around 14 years ago. I was using ConTeXt to write my doctoral thesis. Fond memories of that! After a long hiatus, I'm getting back to it for a personal project I want to typeset. I'm slowly getting back into it, and I'm stumbling over something probably simple, but I can't find a proper answer in the archive. I'm using a doublesided layout with a wider outer margin for margin notes. I'm adding a pagenumber in the footer margin. However, as-is the number is aligned to the inner edge. I'm trying to align the pagenumber on the outer edge of that margin. But I can't manage it. I've tried \setupalign[outer] either as a command or style argument of \setuppagenumbering but it has no effect. My working example: \showframe \setuppapersize[letter][letter] \setuplayout[topspace=0.5cm, bottomspace=0.5cm, cutspace=4cm, rightmargin=3cm, backspace=2cm, leftmargin=1cm, header=1cm, footer=0.5cm, height=middle, width=middle, margindistance=0.2cm, headerdistance=0.2cm, footerdistance=0.2cm] \setuppagenumbering[location={footer, margin}, alternative=doublesided] \starttext \dorecurse{8}{\input knuth} \stoptext Any help would be appreciated! You guys were really helpful too back in the day. :-) Best wishes, JFS
Hi Jeff ! Try this : \showframe \setuppapersize[letter][letter] \setuplayout [topspace=0.5cm, bottomspace=0.5cm, cutspace=4cm, rightmargin=3cm, backspace=2cm, leftmargin=1cm, header=1cm, footer=0.5cm, height=middle, width=middle, margindistance=0.2cm, headerdistance=0.2cm, footerdistance=0.2cm] % stopping automatic location \setuppagenumbering[location=none,alternative=doublesided] % page number in the outer margin at the bottom \setuptexttexts [margin] % zone de marge du bloc texte [] [\framed[frame=off,width=max,height=max,align={outer,low}] {\prefixedpagenumber}] \starttext \dorecurse{8}{\input knuth\par} \stoptext I hope that it is you wanted ! Best//JP Le 28/12/2025 à 16:28, Jeff Smith a écrit :
Hi everyone!
The last time I wrote an email to this list was around 14 years ago. I was using ConTeXt to write my doctoral thesis. Fond memories of that!
After a long hiatus, I'm getting back to it for a personal project I want to typeset. I'm slowly getting back into it, and I'm stumbling over something probably simple, but I can't find a proper answer in the archive.
I'm using a doublesided layout with a wider outer margin for margin notes.
I'm adding a pagenumber in the footer margin. However, as-is the number is aligned to the inner edge. I'm trying to align the pagenumber on the outer edge of that margin. But I can't manage it.
I've tried \setupalign[outer] either as a command or style argument of \setuppagenumbering but it has no effect.
My working example:
\showframe
\setuppapersize[letter][letter] \setuplayout[topspace=0.5cm, bottomspace=0.5cm, cutspace=4cm, rightmargin=3cm, backspace=2cm, leftmargin=1cm, header=1cm, footer=0.5cm, height=middle, width=middle, margindistance=0.2cm, headerdistance=0.2cm, footerdistance=0.2cm]
\setuppagenumbering[location={footer, margin}, alternative=doublesided]
\starttext \dorecurse{8}{\input knuth} \stoptext
Any help would be appreciated! You guys were really helpful too back in the day. :-)
Best wishes, JFS
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist :ntg-context@ntg.nl /https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage :https://www.pragma-ade.nl /https://context.aanhet.net (mirror) archive :https://github.com/contextgarden/context wiki :https://wiki.contextgarden.net ___________________________________________________________________________________
Hi Jean-Pierre! I did not expect such a quick response! I want the pagenumber to remain in the footer. With your solution, it now appears at the bottom of the main body margin, rather than the footer margin itself. I actually do remember toying a bit with setuptexttexts also, and couldn't find a way to make it work in this context. I'm still trying things on my end but I'll take any further help I can get. :-) Thank you so much! JFS On Sun, 28 Dec 2025 at 10:43, Jean-Pierre Delange via ntg-context < ntg-context@ntg.nl> wrote:
Hi Jeff !
Try this :
\showframe
\setuppapersize[letter][letter]
\setuplayout
[topspace=0.5cm, bottomspace=0.5cm,
cutspace=4cm, rightmargin=3cm, backspace=2cm, leftmargin=1cm,
header=1cm, footer=0.5cm,
height=middle, width=middle,
margindistance=0.2cm, headerdistance=0.2cm, footerdistance=0.2cm]
% stopping automatic location
\setuppagenumbering[location=none,alternative=doublesided]
% page number in the outer margin at the bottom
\setuptexttexts
[margin] % zone de marge du bloc texte
[]
[\framed[frame=off,width=max,height=max,align={outer,low}]
{\prefixedpagenumber}]
\starttext
\dorecurse{8}{\input knuth\par}
\stoptext
I hope that it is you wanted !
Best//JP
Le 28/12/2025 à 16:28, Jeff Smith a écrit :
Hi everyone!
The last time I wrote an email to this list was around 14 years ago. I was using ConTeXt to write my doctoral thesis. Fond memories of that!
After a long hiatus, I'm getting back to it for a personal project I want to typeset. I'm slowly getting back into it, and I'm stumbling over something probably simple, but I can't find a proper answer in the archive.
I'm using a doublesided layout with a wider outer margin for margin notes.
I'm adding a pagenumber in the footer margin. However, as-is the number is aligned to the inner edge. I'm trying to align the pagenumber on the outer edge of that margin. But I can't manage it.
I've tried \setupalign[outer] either as a command or style argument of \setuppagenumbering but it has no effect.
My working example:
\showframe
\setuppapersize[letter][letter] \setuplayout[topspace=0.5cm, bottomspace=0.5cm, cutspace=4cm, rightmargin=3cm, backspace=2cm, leftmargin=1cm, header=1cm, footer=0.5cm, height=middle, width=middle, margindistance=0.2cm, headerdistance=0.2cm, footerdistance=0.2cm]
\setuppagenumbering[location={footer, margin}, alternative=doublesided]
\starttext \dorecurse{8}{\input knuth} \stoptext
Any help would be appreciated! You guys were really helpful too back in the day. :-)
Best wishes, JFS
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
Am 28.12.25 um 16:28 schrieb Jeff Smith:
The last time I wrote an email to this list was around 14 years ago. I was using ConTeXt to write my doctoral thesis. Fond memories of that!
Welcome back!
I'm adding a pagenumber in the footer margin. However, as-is the number is aligned to the inner edge. I'm trying to align the pagenumber on the outer edge of that margin. But I can't manage it.
I've tried \setupalign[outer] either as a command or style argument of \setuppagenumbering but it has no effect.
\setuppagenumbering has no align option. Like this:? \define[1]\MyPn{\ifodd\pageno\rightaligned{#1}\else\leftaligned{#1}\fi} \setuppagenumbering[ location=margin, alternative=doublesided, command=\MyPn, ] \showframe \starttext \dorecurse{8}{\input knuth} \stoptext Hraban
Am 28.12.2025 um 18:01 schrieb Henning Hraban Ramm:
Am 28.12.25 um 16:28 schrieb Jeff Smith:
The last time I wrote an email to this list was around 14 years ago. I was using ConTeXt to write my doctoral thesis. Fond memories of that!
Welcome back!
I'm adding a pagenumber in the footer margin. However, as-is the number is aligned to the inner edge. I'm trying to align the pagenumber on the outer edge of that margin. But I can't manage it.
I've tried \setupalign[outer] either as a command or style argument of \setuppagenumbering but it has no effect.
\setuppagenumbering has no align option.
Like this:?
\define[1]\MyPn{\ifodd\pageno\rightaligned{#1}\else\leftaligned{#1}\fi}
\defineframed [MyPn] [width=max,frame=off,offset=overlay,align=outer] Wolfgang
Thank you Wolfgang, this works! It looks like using frame-related commands but with frame=off just for placement needs is a common solution. I'm really grateful. Thank you! Best wishes, JFS On Sun, 28 Dec 2025 at 12:21, Wolfgang Schuster < wolfgang.schuster.lists@gmail.com> wrote:
Am 28.12.2025 um 18:01 schrieb Henning Hraban Ramm:
Am 28.12.25 um 16:28 schrieb Jeff Smith:
The last time I wrote an email to this list was around 14 years ago. I was using ConTeXt to write my doctoral thesis. Fond memories of that!
Welcome back!
I'm adding a pagenumber in the footer margin. However, as-is the number is aligned to the inner edge. I'm trying to align the pagenumber on the outer edge of that margin. But I can't manage it.
I've tried \setupalign[outer] either as a command or style argument of \setuppagenumbering but it has no effect.
\setuppagenumbering has no align option.
Like this:?
\define[1]\MyPn{\ifodd\pageno\rightaligned{#1}\else\leftaligned{#1}\fi}
\defineframed [MyPn] [width=max,frame=off,offset=overlay,align=outer]
Wolfgang
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
participants (4)
-
Henning Hraban Ramm -
Jean-Pierre Delange -
Jeff Smith -
Wolfgang Schuster