Page Layout ⇒ Moving page number to top center
Moving page number to top center
Hi, I'm new to LaTeX and my university gave me an example latex document (https://www.overleaf.com/read/hqkwvxsvynxg). However, their guidelines state that all page numbers (Arabic and roman) should be at the top, I tried several things including fancyhdr but I was only partially successful. I would like some help.
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
Moving page number to top center
Welcome to the forum!
This is a common way with
Put that code into
That's because that package is not recommendable and kind of clashes with
Stefan
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
LaTeX.org admin
Moving page number to top center
Thank you it worked and it looks beautiful.
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 above the (idk if this is the correct way but it worked for me
)
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
