2

Any ideas why the following works fine in the twoside version but creates headers with all section names "List of Tables" (incorrect) in the oneside version?

\documentclass[12pt,oneside]{memoir}
\usepackage{blindtext}

\makepagestyle{mystyle}                 
\makeevenhead{mystyle}{\sffamily\small\leftmark}{}{\sffamily\small\rightmark}
\makeoddhead{mystyle}{\sffamily\small\rightmark}{}{\sffamily\small\leftmark}

\begin{document}

   \tableofcontents*
    \listoffigures*
    \listoftables*

    \pagestyle{mystyle}
    \blinddocument
    \section{Some section}
    \blindtext[8]   
\end{document}

This is how it appears in oneside (incorrect)

incorrect section name

This is how it appears in twoside (correct)

enter image description here

2

There are a few things in play here:

  1. Under oneside only the odd design is used, the even one is ignored as odd vs even pages does not make any sense in a onesided design.

  2. You have not made any marks for your style, this means the default headings marks are used, and these only write to \rightmark under oneside

I'm actually a little surprised that List of Tables ends up in \leftmark.

You could try

\makeatletter
\makepsmarks{mystyle}{%
  \createmark{chapter}{left}{shownumber}{\@chapapp\ }{. \ }
  \createmark{section}{right}{shownumber}{}{. \ }
  \createplainmark{toc}{both}{\contentsname}
  \createplainmark{lof}{both}{\listfigurename}
  \createplainmark{lot}{both}{\listtablename}
  \createplainmark{bib}{both}{\bibname}
  \createplainmark{index}{both}{\indexname}
  \createplainmark{glossary}{both}{\glossaryname}
}
\makeatother

in what ever combination of both, left, right that suits you.


Actually there is a small bug in the current memoir. Under oneside \lofmark and \lotmark ends up writing to both left and right mark even though the defaults headings style sets it to only write to the right mark.

This is going to be fixed in the next release (unknown) date, in the meantime you can issue \pagetyle{headings} in the preamble, to get the style provided by it.

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.