Page LayoutReplacing odd-page book header with subsection name

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
drq
Posts: 2
Joined: Sat May 15, 2010 4:52 am

Replacing odd-page book header with subsection name

Post by drq »

I'm using the document class "memoir," and on the top of each odd page there is a header that gives the title of the current section. How can I change this so that it instead says the name of the current subsection?

Thanks in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Replacing odd-page book header with subsection name

Post by localghost »

Read the manual of the memoir class (Section 2.5 - Headers, Footers and marginal notes; p. 20ff).


Best regards and welcome to the board
Thorsten
drq
Posts: 2
Joined: Sat May 15, 2010 4:52 am

Replacing odd-page book header with subsection name

Post by drq »

I almost found a solution. I inserted this at the beginning:

Code: Select all

\newcommand{\titledsubsection}[1]{\renewcommand{\subsectiontitle}{#1} \subsection{#1}}
\renewcommand{\rightmark}{\subsectiontitle}
and then used \titledsubsection instead of \subsection. However, when there is a page on which a new subsection starts, the header at the top will give the name of the old subsection, rather than the new subsection. Any ideas on how to fix this?
Post Reply