3

I have a small problem with the report class file. Actually I need that the odd pages have chapter title and page number in the header, while the even pages should have page number and chapter title.

Sample code like this:

\documentclass[onecolumn]{report}
\pagestyle{headings}
\begin{document}
\chapter{chapter title here}
\section{section title here}
blahblah
\end{document}
3

The fancyhdr package makes it easy to customise the headers and footers. For example

\documentclass[twoside]{report}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyfoot{}{}{}
\fancyhead[LO,RE]{\leftmark}
\fancyhead[LE,RO]{\thepage}
\begin{document}
\chapter{A chapter}
\newpage
Even numbered page
\newpage
Odd numbered page
\end{document}

Note that the special pages on which chapters begin are not affected by this (though you can change them as well if you need to).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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