Page Layout ⇒ Moving page number to top center
Moving page number to top center
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Moving page number to top center
This is a common way with
fancyhdr
:Code: Select all
\usepackage{fancyhdr}
\fancyhf{}
\fancyhead[C]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\pagestyle{fancy}
preamble.tex
. And I would remove this line in preamble.tex
:Code: Select all
\usepackage{fullpage}
geometry
and would cause the header line to overlap with text or headings.Stefan
Moving page number to top center
For any other that have the same issue that is new to LaTeX, I want to add that to get the table of contents page number also on top you can add
Code: Select all
\tocloftpagestyle{fancy}
Code: Select all
\tableofcontents
