summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkira Yokosawa <akiyks@gmail.com>2023-08-19 08:57:38 +0900
committerPaul E. McKenney <paulmck@kernel.org>2023-08-18 19:36:19 -0700
commit37c75860f5195b50e5635dafa037c0cb1535778a (patch)
tree4fcb43607050720759deb969cdc84f0770d7672b
parent54b77242aac76979b8bbb832809b55736167bf5e (diff)
downloadperfbook-37c75860f5195b50e5635dafa037c0cb1535778a.tar.gz
qqz.sty: Work around orphaned section heading
In ebook-size builds, tcolorbox occasionally complains: Package tcolorbox Warning: Using nobreak failed. Try to enlarge `lines before break' or set page breaks manually on input line xxxx. This warning is accompanied by an unfortunate page/column break just below a section heading in Appendix E. Make such ugly breaks less likely by enclosing the \section command with a pair of pagebreak/nopagebreak hints. Signed-off-by: Akira Yokosawa <akiyks@gmail.com> -- You need to be very lucky to observe this issue. At the moment, you can observe it in perfbook-ebsf.pdf built on Ubuntu 22.04. Section E.18's heading goes to the bottom of page 1277. This change makes it go to the top of page 1278. -- qqz.sty | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
-rw-r--r--qqz.sty3
1 files changed, 2 insertions, 1 deletions
diff --git a/qqz.sty b/qqz.sty
index 5c7eb534..74ee0566 100644
--- a/qqz.sty
+++ b/qqz.sty
@@ -223,8 +223,9 @@
%% Internal interfaces generated by scripts.
\newcommand{\QuickQAC}[3]{
+ \pagebreak[3]
\edef\QuickQuizAnswerChapter{\getrefnumber{#1}}
- \section{#2}}
+ \section{#2}\nopagebreak}
\IfNoQqz{
\newcommand{\QuickQQC}[3]{