Hello,
could you please help me in this issue? I am trying to put the header at the center but it is located at the right side. I am using these commands:
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{%
\markboth{\chaptername
\ \thechapter.\ #1}{}}
\renewcommand{\headrulewidth}{1pt}
\fancyhead[RE,LO]{}
\fancyhfoffset[R]{0cm}
Thank you.
Page Layout ⇒ How to center the page header?
How to center the page header?
Last edited by sina2010 on Thu Oct 28, 2010 10:24 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

How to center the page header?
Is this what you want:
If not, post an actual minimal working example and not just a snippet. It would help to read the fancyhdr documentation as well.
Code: Select all
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{%
\markboth{\chaptername
\ \thechapter.\ #1}{}}
\renewcommand{\headrulewidth}{1pt}
\fancyhead[LO,RE]{}
\fancyhead[CE,CO]{\leftmark}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How to center the page header?
It is essential that you always provide a minimal example. This is also a point that you have been notified in the past. People are rarely motivated to build a minimal document on their own just for testing possible solutions.
Thorsten
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
Re: How to center the page header?
Thank you, it worked. also it needed one more command too: \fancyhead[LE,RO]{}.
Thank you.
Thank you.