Page LayoutPage numbering top right corner

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Heracless123
Posts: 1
Joined: Thu Apr 20, 2023 5:56 pm

Page numbering top right corner

Post by Heracless123 »

Hello Community,

I currently working on my bachelor thesis and using latex. I have a given format but unfortunately not all page numbers are displayed in the top right corner sometimes they are in the bottom center. In picture 1 you can see how it normally looks, but this is not the case on every page. I have tried using fancyhdr to set the page number to the top right of each page, however the header then becomes a simple line with the number as it should be. Does anyone have a solution how I can place all the page numbers in the top right corner but the header doesn't change otherwise?

Thanks in advance!

Picture 1
P1.png
P1.png (6.12 KiB) Viewed 8673 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Page numbering top right corner

Post by kaiserkarl13 »

I suspect that the problem is that \pagestyle{plain} is issued at the beginning of chapters. If you are using fancyhdr, then issuing

Code: Select all

\fancypagestyle{plain}{%
    % Put code that you want to generate the header and footer on chapter pages here
    % example is below
    \fancyhf{}%
    \fancyhead[R]{\thepage}
}
Post Reply