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
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
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: 10360
- 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: 10360
- 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