Page Layout ⇒ Page numbering in margin next to text block
Page numbering in margin next to text block
Hi,
I'ld like to have the page numbering in the margins, so that the numbers appear left or right of the text block. This is for a book design using the memoir class and xelatex.
I would appreciate some help!
Bram
I'ld like to have the page numbering in the margins, so that the numbers appear left or right of the text block. This is for a book design using the memoir class and xelatex.
I would appreciate some help!
Bram
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Page numbering in margin next to text block
Give a clear problem description in form of a minimal example.
Best regards and welcome to the board
Thorsten
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Page numbering in margin next to text block
I would like to have page numbers at approximate the position that I have sketched in these pictures: Ideally, the page numbering should be included in my page style:localghost wrote:Give a clear problem description in form of a minimal example.
Best regards and welcome to the board
Thorsten
Code: Select all
\documentclass{memoir}
\makepagestyle{mystyle}
\makeevenfoot {mystyle}{\pagefootfont\leftmark}{} {}
\makeoddfoot {mystyle}{}{}{\pagefootfont\rightmark}
\createmark {chapter} {both} {nonumber}{ }{. \ }
\pagestyle{mystyle}
\begin{document}
\chapter{Chapter to test layout}
Lorem ipsum dolor sit amet, consectetur
\end{document}
Last edited by Stefan Kottwitz on Sat Jul 14, 2012 8:23 pm, edited 1 time in total.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Page numbering in margin next to text block
Your example is not compilable as is. The command
\pagefootfont
is detected as an undefined control sequence. Please check your examples for functionality before you present them.How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Page numbering in margin next to text block
Sorry, this should be better. Thanks for your patience!localghost wrote:Your example is not compilable as is. The command\pagefootfont
is detected as an undefined control sequence. Please check your examples for functionality before you present them.
Code: Select all
\documentclass{memoir}
\makepagestyle{mystyle}
\makeevenfoot {mystyle}{\leftmark}{} {}
\makeoddfoot {mystyle}{}{}{\rightmark}
\createmark {chapter} {both} {nonumber}{ }{. \ }
\pagestyle{mystyle}
\begin{document}
\chapter{Chapter to test layout}
Lorem ipsum dolor sit amet, consectetur
\end{document}
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
Page numbering in margin next to text block
Hi Bram,
welcome to the board!
Here is an example with
textpos:
Stefan
welcome to the board!
Here is an example with

Code: Select all
\usepackage{calc}
\usepackage[absolute]{textpos}
\makepagestyle{mystyle}
\makeevenfoot{mystyle}{%
\begin{textblock*}{1em}(2em,.5\paperheight)
\Huge\thepage
\end{textblock*}
\thepage
}{}{}
\makeoddfoot{mystyle}{%
\begin{textblock*}{1em}(\paperwidth-3em,.5\paperheight)
\Huge\thepage
\end{textblock*}
\thepage
}{}{}
\pagestyle{mystyle}
LaTeX.org admin
Re: Page numbering in margin next to text block
Thanks a lot! That solves my problem, and has shown me the way to a very useful package.