1

How to add the page numbering at the bottom right of the page, when the page margin is very small?

\documentclass{article}
\usepackage[a4paper,margin=2mm]{geometry}
\usepackage{lipsum}

\begin{document}

\lipsum[1-5] \lipsum[1-5] \lipsum[1-5] \lipsum[1-5] \lipsum[1-5] \lipsum[1-5]

\end{document}

enter image description here

Ommo
  • 835
  • 1
    Firrst, printers can't actually handle a 3mm margin. Once you get past page 9, you will have to overlap the text. Do you want to leave a gap in the lower right corner in which to fit the page number? Somewhay related: https://tex.stackexchange.com/questions/553233/apply-parshape-from-the-last-line-of-a-paragraph – John Kormylo Mar 15 '24 at 19:57
  • I am open to several solutions.. thanks :-) – Ommo Mar 16 '24 at 08:15

1 Answers1

2

If you reduce \footskip you can theoretically squeeze in the page foot, although whether things print correctly this close to the edge depends on things, for viewing a pdf though that isn't an issue.

enter image description here

\documentclass{article}
\usepackage[a4paper,margin=2mm]{geometry}
\usepackage{lipsum}
\pagestyle{plain}
\setlength\footskip{1pt}
\def\thepage{\smash{\raisebox{.2pt}{---\arabic{page}---}}}
\begin{document}

\lipsum[1-5] \lipsum[1-5] \lipsum[1-5] \lipsum[1-5] \lipsum[1-5] \lipsum[1-5]

\end{document}

David Carlisle
  • 757,742