Return-Path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692403061; x=1693007861; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=5OEABOOR3NTkXiMI+1dVx0YQPUI/ppZwp5Hzy5rpoj8=; b=swYhS3FsKeeTpXxNq2WoVRJBF1eVO9vQFnOp0SPiSsJ2foTCKKmkxkVbfyC8u/JC6m 75iW6v78kQ5l4lWV3PRkAPBrndUYUJWqjXFgDBADv3CIsnkXL8d4oUkM7aick2n/1RyR xm1jlm2tQekemz5vWMmY7kOrpWjuNuyNXmDtDbUovlccZ4J+ELGl11b3zI0Uc3u4DNc6 V8Wy9NOipqZj0jHsKsNGIIwlFjJ4MJFYMPfaQ0hoF7oOGhpd0rAiuT4gK4QH58yAfP6+ J7+8uoBqqDnyzpD7Abp+oc3Lz6uT2j1VF2ONZtfPauQmRSHQO/MBT223Ky2ZYwKb8dNH q0YA== Message-ID: Date: Sat, 19 Aug 2023 08:57:38 +0900 MIME-Version: 1.0 Content-Language: en-US From: Akira Yokosawa Subject: [PATCH -perfbook 1/2] qqz.sty: Work around orphaned section heading Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit To: "Paul E. McKenney" Cc: perfbook@vger.kernel.org, Akira Yokosawa List-ID: 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 -- 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(-) diff --git a/qqz.sty b/qqz.sty index 5c7eb5340194..74ee0566b1c2 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]{ base-commit: 54b77242aac76979b8bbb832809b55736167bf5e -- 2.25.1