Skip to content

Commit 054b680

Browse files
committed
[macros] Prefer page break above 'note' or 'example' introducers
Fixes ISO/CS comment (C++23 proof)
1 parent 85f4bb4 commit 054b680

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/macros.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@
318318
\newcommand{\newnoteenvironment}[3]{
319319
\newsubclausecounter{#1}
320320
\newenvironment{tail#1}
321-
{\par\small\stepcounter{#1}\noteintro{#2}}
321+
{\par\small\penalty -200\stepcounter{#1}\noteintro{#2}}
322322
{\noteoutro{#3}}
323323
\newenvironment{#1}
324324
{\begin{tail#1}}
@@ -570,7 +570,7 @@
570570
% surrounded by @ signs.
571571
\newcommand{\CodeBlockSetup}{%
572572
\lstset{escapechar=@, aboveskip=\parskip, belowskip=0pt,
573-
midpenalty=500, endpenalty=-50,
573+
beginpenalty=200, midpenalty=500, endpenalty=-50,
574574
emptylinepenalty=-250, semicolonpenalty=0,upquote=true}%
575575
\renewcommand{\tcode}[1]{\textup{\CodeStylex{##1}}}
576576
\renewcommand{\term}[1]{\textit{##1}}%

0 commit comments

Comments
 (0)