Using memoir class on a (lengthy) document, I want to customise headers, however (having spent several hours of trial and error) I'm presently stumped when it comes to the nuances required. Can anyone point me in the right direction?
I enclose my MWE. The customised page style ('mpd') provides:
- an even page header of 'Chapter (number, name etc)' and
- an odd page header of 'Section'.
I want to
- switch the 'Chapter (etc)' to the odd page and
- make the even page header show the document (book) title.
There does not seem to be any reference to document title within Memoir Page Styles, which I have consulted widely in my efforts. Yet it seems like something that should be readily achievable?
Many thanks for any input offered.
\documentclass[a5paper]{memoir}
\usepackage{lipsum}
% ------------------------
% new style: mpd
% copied from headings style
% with no caps in headers
\copypagestyle{mpd}{myheadings}
\addtopsmarks{mpd}{\nouppercaseheads}
{\createmark{chapter}{left}{shownumber}{\chaptername \space}{ : }
\createmark{section}{right}{nonumber}{}{}
}%
\makeoddhead{mpd}{\slshape\rightmark}{}{}
\makeevenhead{mpd}{}{}{\slshape\leftmark}
\makeevenfoot{mpd}{\thepage}{}{\itshape{republished under licence}}
\makeoddfoot{mpd}{\itshape{www.domain.info}}{}{\thepage}
\pagestyle{mpd}
\begin{document}
\tableofcontents*
\pagestyle{mpd}
\mainmatter
\chapter{Introduction}
\label{introduction}
\section{Section 1}
\label{section1}
\lipsum[1]
\lipsum[2]
\lipsum[3]
\lipsum[4]
\lipsum[5]
\lipsum[1]
\lipsum[2]
\lipsum[3]
\lipsum[4]
\lipsum[5]
\lipsum[1]
\lipsum[2]
\lipsum[3]
\lipsum[4]
\lipsum[5]
\end{document}
% ------------------------
\makeoddhead{mpd}{\slshape\leftmark}{}{} \makeevenhead{mpd}{}{}{\slshape\mytitle} \def\mytitle{The title}