General ⇒ URGENT: Page Style for page numbering
URGENT: Page Style for page numbering
I am writing my Phd thesis and I need to have the page number in the top of the pages and centered
what pagestyle or packages allows me to do that ? I have been stuck with this problem for a while and it is a graduate school absolute requirement for the thesis format as far as page numbering is concerened
pls help ASAP
thnx alot
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Re: URGENT: Page Style for page numbering
You can get page numbers in header, centered this way:
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[C]{\thepage}
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
URGENT: Page Style for page numbering
welcome to the board!
Just in case you didn't find the documentation of fancyhdr until now, you may find it on CTAN: here.
You might notice, that some pages will have a different style, like the first page of a chapter. If you need to change that too, you could use \fancypagestyle{plain}{...}, see 7 Redefining plain style in the package documentation.
Stefan
Re: URGENT: Page Style for page numbering
meho_r
the lines you have written are helful in setting the page number in the middle of the bottom of the page
I need the page number to be centered at THE TOP of the page
I am still stuck with this problem and readying the manual of fancyhdr is not helpful
pls help!
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
URGENT: Page Style for page numbering
consider following small example:
Code: Select all
\documentclass[a4paper,10pt]{report}
\usepackage{fancyhdr}
\fancyhf{}
\fancyhead[C]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancypagestyle{plain}{}
\pagestyle{fancy}
\begin{document}
\chapter{One}
\section{one}
text
\newpage
text
\end{document}
Stefan