Skip to content

Commit

Permalink
fix subsections wrapping to next page
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisfenner committed Dec 9, 2023
1 parent 2c2d122 commit 7cd037a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions template/eisvogel.latex
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@ $endif$
\makesavenoteenv{longtable}
$endif$

% Subsections don't wrap to a new page by default.
% Workaround from https://tex.stackexchange.com/questions/162236/subsection-on-new-page-if-it-doesnt-fit
\preto{\section}{\clearpageafterfirst}
\preto{\subsection}{\filbreak}
\newcommand{\clearpageafterfirst}{%
\gdef\clearpageafterfirst{\clearpage}%
}

\usepackage{footnotebackref}
$if(graphics)$
\usepackage{graphicx}
Expand Down

0 comments on commit 7cd037a

Please sign in to comment.