This is a follow up question to Re-displaying section headings after page-breaks. The top answer by Werner works, but not when the package titlesec is loaded. Is another solution possible which does not conflict with titlesec?

1 Answer 1


It's almost the same, but without the need of \patchcmd; just use titlesec's facilities.

\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{everyshi}% http://ctan.org/pkg/everyshi
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox

  {\gdef\@section@title@{\thesection\quad#1 (continued)}#1}

  {\gdef\@section@title@{#1 (continued)}#1}

  {3ex plus 2ex minus 1ex}
  {1ex plus .5ex minus .5ex}

\let\@section@title@\relax% Sectional heading storage
  {\noindent\normalfont\bfseries\Large\@section@title@}\par\vspace{1ex plus .5ex minus .5ex}%
  \ifdim\pagetotal>\pagegoal% There is content overflow on this page
    \aftergroup\print@section@title@% Reprint/-insert sectional heading
\section{A section}\lipsum[1-6]
\subsection{A subsection}\lipsum[7-14]

The definition of \print@section@title@ should reproduce the section title's format.

enter image description here

  • I think there's a '}' missing in \titleformat{name=\section,numberless} {\normalfont\bfseries\Large} {} {0pt} {\gdef\@section@title@{#1 (continued)#1}after '(continued)'.
    – twsh
    Mar 10, 2014 at 1:02

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.