Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The title says it all. A friend is working on her thesis and we cannot figure out how to ensure that the page numbering is equally formatted on all the pages that display page numbers.

Default positioning has the page numbers altering left and right on even and odd pages, and at the bottom of the first page of every chapter.

Ideally she wants the the page numbers on every page printed on the top right corner of her book with no special formatting added for the first page of a chapter.

Any experience with this kind of customization?


Edit:

An MWE was requested and is therefore supplied.

\documentclass{book}
\begin{document}
\chapter{foo}
Special chapter title page. Page number positioned at bottom of page


\pagebreak
Normal body text. Page number positioned at top left corner of page.
\end{document}
share|improve this question
1  
Perhaps all you need to do is turn off two-sided mode? If you have "twoside" set as a document option (on the \documentclass line), just take it out. If it's not that simple please post a MWE. –  Thruston May 10 '13 at 14:13
    
Are you stuck with the book class? If not try changing to \documentclass{report} and then put \pagestyle{headings} right after the \begin{document}. –  Thruston May 10 '13 at 15:39
add comment

1 Answer

up vote 5 down vote accepted

To get all pages formatted with a page number in the center of the footer is quite simple with fancyhdr.

MWE 1

\documentclass{book}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[LE]{}
\fancyhead[RO]{}
\fancyhead[RE]{}
\fancyhead[LO]{}
\cfoot{\thepage}
\begin{document}
\chapter{foo}
Special chapter title page. Page number positioned at bottom of page.


\pagebreak
Normal body text. Page number positioned at bottom of page again.
\end{document}

If you want all pages to have the number in the upper right, it's a tiny bit more complicated but still quite doable, see Section 7 of the fancyhdr manual.

MWE 2

\documentclass{book}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[LE]{}
\fancyhead[RO]{}
\fancyhead[RE]{}
\fancyhead[LO]{}
\fancyfoot[C]{}
\rhead{\thepage}

\fancypagestyle{plain}{%
\fancyhf{}
\rhead{\thepage}
}

\begin{document}
\chapter{foo}
Special chapter title page. Page number positioned at top right.

\pagebreak
Normal body text. Page number positioned at top right again.
\end{document}
share|improve this answer
    
The MWE is confusing; I think she wants all page numbers top right. –  Paul Stanley May 10 '13 at 20:25
    
That can also be done with fancyhdr; see Section 7 of the manual. I'll add a 2nd MWE. –  Joe Corneli May 12 '13 at 14:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.