If you compile my minimal example and look on page 3, there should not be a section title in the header. On page 5 the section title should remain section one until the next page, because section one ends on that page.
I have tried to fiddle around with the both, left and right commands and changed the \leftmark and \rightmark commands around, but I haven't found a solution, so I hope you can help.
Code: Select all
\documentclass[12pt,a4paper,onecolumn,oneside,final]{memoir}
\usepackage{multicol}
\usepackage[english]{babel}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage[textwidth=10cm,textheight=22cm]{geometry}
\usepackage{calc}
\usepackage{lipsum}
\makepagestyle{HDR}
\makepsmarks{HDR}{\nouppercaseheads
\createmark{chapter}{left}{nonumber}{}{\space}
\createmark{section}{right}{nonumber}{}{\space}
\makeheadrule{HDR}{10cm}{\normalrulethickness}
}
\makeoddhead{HDR}{\small\normalfont\mdseries\textsc{\leftmark}\hskip.3cm\vrule\hskip.3cm\bfseries\rightmark}{}{}
\makeoddfoot{HDR}{}{\thepage}{}
\begin{document}
\pagestyle{HDR}
\chapter{Chapter One}
\lipsum
\section{Section One}
\lipsum
\section{Section Two}
\lipsum
\end{document}