[Tex/LaTex] Distinguish even/odd pages in header with oneside option

double-sidedfancyhdrheader-footer

See the MWE below. How can I achieve (in the standard book class) that despite the oneside option odd and even pages are distinguished in the header? I would like to have that, also with oneside printing, the header of odd pages displays the chapter while the header of even pages displays the section, just as it would be the case without the oneside option.

\documentclass[oneside]{book}

\usepackage{lipsum}
\usepackage{fancyhdr}

\usepackage[
  a4paper,                                    
  textwidth=16cm,                             
  outer=2cm,
  textheight=45\baselineskip,
  headheight=\baselineskip,
  includehead=true,% Default
  heightrounded,
]{geometry}

\pagestyle{fancy}
\fancyhead{}
\fancyhead[LO]{\leftmark}
\fancyhead[RE]{\rightmark}
\fancyhead[LE,RO]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\fancyfoot{}

\begin{document}

\chapter{Chapter One}
\section{Section One of Chapter One}
\lipsum
\lipsum
\section{Section Two of Chapter One}
\lipsum
\lipsum

\end{document}

Best Answer

Another alternative is to use oneside, but toggle headers based on the page number, like this:

\documentclass[oneside]{book}

\usepackage{lipsum}
\usepackage{fancyhdr}
\usepackage{ifthen}

\pagestyle{fancy}
\fancyhead{}
\fancyhead[L]{\ifthenelse{\isodd{\value{page}}}{\leftmark}{\rightmark}}
\fancyhead[R]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\fancyfoot{}

\begin{document}

\chapter{Chapter One}
\section{Section One of Chapter One}
\lipsum
\lipsum
\section{Section Two of Chapter One}
\lipsum
\lipsum

\end{document}