[PATCH 3/6] Prevent section epigraph from orphaned

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

 



>From a0018ab43dcde623de230b7077820c4ee86a5144 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@xxxxxxxxx>
Date: Sat, 11 Jan 2020 08:17:27 +0900
Subject: [PATCH 3/6] Prevent section epigraph from orphaned

Latest "epigraph" package has a nice feature to make sure that
section epigraph is not orphaned.

Add version info to its \usepackage.
Also add it to #10 in FAQ-BUILD.txt.

Also suppress widows and orphans by using the "nowidow" package.
This prevents a single line of a paragraph to appear at the
bottom or the top of a page/column. For example, Short QQZ (less
than 4 lines) won't be broken in the middle any more.

This narrows the freedom of LaTeX's typesetting and slightly
increases page count, but should improve the ease of read.

NOTE 1: epigraph's document now mentions a macro \epigraphnoindent
which would have the same effect as \NoIndentAfterCmd{\epigraph},
but it has weird side effect on the spacing of other section
headings.

NOTE 2: This update causes stretched vertical spaces between
paragraphs in pages where section headings with epigraphs are
forwarded to the next pages.  They might need tweaks in LaTeX
sources later, especially in the -RC stages of the next edition.

Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>
---
 FAQ-BUILD.txt | 7 +++++--
 perfbook.tex  | 3 ++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/FAQ-BUILD.txt b/FAQ-BUILD.txt
index f5066798..56d60a3e 100644
--- a/FAQ-BUILD.txt
+++ b/FAQ-BUILD.txt
@@ -178,11 +178,13 @@
 			tlmgr install newtx
 
 10.	Building perfbook fails with a warning of buggy cleveref/listings
-	or version mismatch of titlesec/draftwatermark. What can I do?
+	or version mismatch of titlesec/draftwatermark/epigraph.
+	What can I do?
 
 	A.	They are known issues on Ubuntu Xenial (titlesec),
 		Ubuntu Bionic (cleveref), TeX Live 2014/2015 (listings),
-		and TeX Live releases prior to 2015 (draftwatermark).
+		TeX Live releases prior to 2015 (draftwatermark),
+		and TeX Live releases prior to 2020 (epigraph).
 		This answer assumes Ubuntu, but it should work on other
 		distros.
 
@@ -191,6 +193,7 @@
 		http://mirrors.ctan.org/macros/latex/contrib/cleveref.zip
 		http://mirrors.ctan.org/macros/latex/contrib/listings.zip
 		http://mirrors.ctan.org/macros/latex/contrib/draftwatermark.zip
+		http://mirrors.ctan.org/macros/latex/contrib/epigraph.zip
 
 	    2.	Install it by following instructions at:
 		https://help.ubuntu.com/community/LaTeX#Installing_packages_manually
diff --git a/perfbook.tex b/perfbook.tex
index db334ae4..38272761 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -71,7 +71,7 @@
 \usepackage[bookmarks=true,bookmarksnumbered=true,pdfborder={0 0 0},linktoc=all]{hyperref}
 \usepackage{footnotebackref} % to enable cross-ref of footnote
 \usepackage[all]{hypcap} % for going to the top of figure and table
-\usepackage{epigraph}
+\usepackage{epigraph}[2020/01/02] % latest version prevents orphaned epigraph
 \setlength{\epigraphwidth}{2.6in}
 \usepackage[xspace]{ellipsis}
 \usepackage{braket} % for \ket{} macro in QC section
@@ -80,6 +80,7 @@
 \usepackage{multirow}
 \usepackage{noindentafter}
 \NoIndentAfterCmd{\epigraph}
+\usepackage[all]{nowidow}
 \titleformat{\paragraph}[runin]{\normalfont\normalsize\bfseries}{}{0pt}{}
 
 % custom packages
-- 
2.17.1





[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