[Tex/LaTex] Alternating header titles

fancyhdrheader-footersectioning

I'm trying to figure out how to get the odd and pages to display the current section name and the odd pages to display the title of the paper.

How do I accomplish this?

I'm using article and I have fancyhdr loaded.

Best Answer

Here's one possibility:

\documentclass[twoside]{article}
\usepackage{fancyhdr}
\usepackage{lipsum}% just to generate text for the example

\fancyhf{}
\renewcommand\headrulewidth{0pt}
\fancyhead[LO]{\nouppercase\leftmark}
\fancyhead[RE]{\hdrtitle}
\fancyhead[LE,RO]{\thepage}
\pagestyle{fancy}

\title{Some Title}
\author{Some Author}

\makeatletter
\let\hdrtitle\@title
\makeatother

\begin{document}
\section{Test Section One}
\lipsum[1-10]
\section{Test Section Two}
\lipsum[1-10]
\end{document}
Related Question