Page Layout ⇒ Question about the Extramarks package
Question about the Extramarks package
\Section{XYZ}
\extramarks{}{}
text text text text
text text text text...
\extramarks{Section XYZ Continued}{}
\extramarks{}{}
This works very well if content for a \section{} only spills onto 1 more page. If the content for a \section{} spills onto multiple pages, then the "Section <XYZ> Continued" remark only appears in the header for the last page for which there is content for \section{}. The header for the preceeding pages with \section{} content is blank. Why is this? How can I get "Section <XYZ> Continued" remarks to appear on all headers wich contain \section{XYZ} content minus the first page where \section{XYZ} content appears?
Thanks!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Question about the Extramarks package
instead of using fancyhdr and extramarks, I would suggest you to use the titlesec package. In the following example I defined two new page styles: mysec, to be used in the first page of a section and myseccon to be used in the second, third, etc. pages of a section. I also redefined the format for the section headings to include the mysec page style.
Code: Select all
\documentclass{article}
\usepackage[pagestyles]{titlesec}
\usepackage{lipsum}
% style for the first page of a section
\newpagestyle{mysec}{\sethead{}{}{\thesection\enspace\sectiontitle}}
% style for the second, third, etc. pages of a section
\newpagestyle{myseccon}{\sethead{}{}{\thesection\enspace\sectiontitle\space (Continued)}}
% redefining the format for section headings; the new format basically imitates the
% standard format, but uses the page style "mysec"
\titleformat{\section}
{\normalfont\Large\bfseries}{\thesection}{1em}{\thispagestyle{mysec}}
\titlespacing*{\section}
{0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}
\begin{document}
\pagestyle{myseccon}
\section{First test section}
\lipsum[1-20]
\section{Second test section}
\lipsum[1-20]
\end{document}