Page LayoutChange page numbering style for \chapter

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Egor_MIPT
Posts: 1
Joined: Fri Apr 17, 2020 11:41 am

Change page numbering style for \chapter

Post by Egor_MIPT »

Dear colleagues,
I have a trouble with changing header style of \chapter... I need to change position of page number from the right to the center.
As I know \chapter uses 'plain' style by default. Thus, I use the further code to modify it:

\usepackage{fancyhdr}
\fancypagestyle{plain}{
\fancyhf{}
\fancyhead[C]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\rhead{\thepage}}


But... After compilation I have two page numbers in my header at the right and at the center. Seems like in some reasons \fancyhf{} command doesn't clear the header.
chqpter.png
chqpter.png (40.87 KiB) Viewed 1773 times
Please, help me delete the number at the right position and leave only at the center.

Sincerely,
Egor

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Change page numbering style for \chapter

Post by Ijon Tichy »

Have you noticed the \rhead{\thepage}?

BTW: I cannot test, whether or not removing this will help, because you've not posted a Infominimal working example, which is always recommended.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
Post Reply