I am using the fancyhdr package. I have chapters, sections, subsections, and subsubsections to my book.

I currently show chapters and sections on alternating pages in the running headers.

But in every chapter there are a few subsections out of the dozen or so that I would like instead in the header on those pages.

The example below has two subsections with the one subsection "Subsection in Header" I would like in the header. I understand that for a one-off scenario like in the example below I could define a fancypagestyle. But the issue is that I would need to define 100 of these for the 100 of 300 subsections I would like in the header.




\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}




\part{First Part}

\chapter{First Chapter}

\section{First Section}

\subsection*{First Subsection}

\subsection*{Subsection in Header} % this subsection should be in the header on odd pages (so page 11)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.