12

Using fancyhdr and the book class, one can set different headers/footers for odd/even pages as

\fancyhdr[RO]{foo}
\fancyhdr[LE]{bar}

and so on. How can I achieve the same with an article class, where things are not two sided?

11

The article class defaults to a simple oneside document. You can load it with the twoside option

\documentclass[twoside]{article}

\usepackage{fancyhdr}
\fancyhead[LE,RO]{foo}
\fancyhead[LO,RE]{bar}
\pagestyle{fancy}
\usepackage{lipsum}

\begin{document}

\lipsum
\lipsum
\lipsum

\end{document}

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.