Re: [PATCH -perfbook 2/2] qqz: Suppress possible orphan heading

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 08, 2021 at 08:10:19PM +0900, Akira Yokosawa wrote:
> As of Edition.2 and current master, heading of Appendix E.7 is
> orphaned in perfbook.pdf.
> 
> This is because framing of quiz part at the beginning of a section
> implies paragraph break and invalids the afterheading-ness of the
> first question.
> 
> To suppress such an unfortunate result, tweak the \bottomtitlespace
> variable of the "titlesec" package for Appendix E.
> 
> Positive length of \bottomtitlespace prohibits a section title
> to appear in the bottom part of that length and forces the title
> to be on the next page.
> This should be acceptable in Appendix E.
> 
> There exist the same patterns of quick quiz at the beginning of
> a section in the main text as well as in -nq builds, which might
> cause an orphan heading.
> 
> Such cases would be dealt with case by case bases.
> 
> Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>

I queued and pushed both, thank you!

I tried the following to give LaTeX more choice, which did work, but
I am not sure that it is an improvement.  But maybe it will inspire
something should the current approach fail at some point in the future?

							Thanx, Paul

------------------------------------------------------------------------

diff --git a/qqz.sty b/qqz.sty
index 897d1ab6..abecb7e8 100644
--- a/qqz.sty
+++ b/qqz.sty
@@ -203,7 +203,9 @@
 }{
 \newcommand{\QuickQAC}[3]{
 	\edef\QuickQuizAnswerChapter{\getrefnumber{#1}}
-	\section{#2}}
+	\section{#2}
+	This section contains the answer key to the quick quizzes
+	from \cref{#1} on page~\pageref{#1}.}
 }
 
 \IfQqzBg{



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux