Skip to contentSkip to conversation

Permit occasional orphans

PATCH Applied Akira Yokosawa 2 participants 6 messages Feb 6, 2020 – Feb 8, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Permit occasional orphans

From 6ad4c736867394d765a4b50aba907ef0dd8420ba Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Thu, 6 Feb 2020 22:16:28 +0900
Subject: [PATCH] Permit occasional orphans

Recent update of upstream LaTeX caused excessively wide spaces between paragraphs in 2c layout similar to the issue mentioned in the change log of commit 4c6ee39761a0 ("Remove required version of 'epigraph'") at the beginning of Chapter 6.

The root cause of the unstable behavior is the constraints imposed by the unfortunate combination of a fairly tall unbreakable block (consisting of a section heading, a section epigraph, a paragraph of only 3 lines), a footnote, and a floating figure.

Note that the "nowidow" package requires at least 4 lines for a paragraph to be broken.

An orphan line (first line of a paragraph at the bottom of a page/column) looks less ugly than a widow line (final line of a paragraph at the top of a page/column) does.

As a band-aid patch, this commit permits an orphan at the problematic paragraph by the \noclub command provided by the "nowidow" package and avoids such ugly wide spaces.
Another approach would be to add some words to the paragraph and make it 4 lines or more.

By this change, TeX Live 2015/Debian (on Ubuntu Xenial) with the up-to-date "epigraph" can also produce the (mostly) same output.

Do similar tweaks to avoid wide vertical spaces in a couple of other chapters.

---
Hi Paul,

As mentioned in the change log, if you add some words to the paragraph in partexercises.tex, the \noclub[1] can be removed. In the other places, the problem is not the length of the paragraph and you need different tweaks to avoid orphans. Let me see what the tweaks would be.

Thanks, Akira

 SMPdesign/partexercises.tex | 1 +
 debugging/debugging.tex     | 1 +
 locking/locking.tex         | 1 +
 3 files changed, 3 insertions(+)
SMPdesign/partexercises.tex +1 -0
index 9cebe6b7..1708da93 100644
@@ -12,6 +12,7 @@
 
 This section uses a pair of exercises (the classic Dining Philosophers
 problem and a double-ended queue) to demonstrate the value of partitioning.
+\noclub[1]
 
 \subsection{Dining Philosophers Problem}
 \label{sec:SMPdesign:Dining Philosophers Problem}
debugging/debugging.tex +1 -0
index 286f6df7..07350fe1 100644
@@ -2256,6 +2256,7 @@ Section~\ref{sec:debugging:Detecting Interference Via Measurement}
 describes methods of rejection involving additional measurements,
 while Section~\ref{sec:debugging:Detecting Interference Via Statistics}
 describes statistics-based rejection.
+\noclub[1]
 
 \subsubsection{Detecting Interference Via Measurement}
 \label{sec:debugging:Detecting Interference Via Measurement}
locking/locking.tex +1 -0
index 3c2949fa..8a1a3101 100644
@@ -1010,6 +1010,7 @@ Therefore CPU~1 will likely acquire the lock.
 If CPU~1 holds the lock long enough for CPU~0 to be requesting the
 lock by the time CPU~1 releases it and vice versa, the lock can
 shuttle between CPUs~0 and~1, bypassing CPUs~2--7.
+\noclub[1]
 
 \QuickQuiz{}
 	Wouldn't it be better just to use a good parallel design
Signature · 1 line
2.17.1
#1 lore raw
Quoted 28 lines · Akira Yokosawa
Quoted 1 line

From 6ad4c736867394d765a4b50aba907ef0dd8420ba Mon Sep 17 00:00:00 2001

From: Akira Yokosawa <[email protected]>
Date: Thu, 6 Feb 2020 22:16:28 +0900
Subject: [PATCH] Permit occasional orphans

Recent update of upstream LaTeX caused excessively wide spaces between paragraphs in 2c layout similar to the issue mentioned in the change log of commit 4c6ee39761a0 ("Remove required version of 'epigraph'") at the beginning of Chapter 6.

The root cause of the unstable behavior is the constraints imposed by the unfortunate combination of a fairly tall unbreakable block (consisting of a section heading, a section epigraph, a paragraph of only 3 lines), a footnote, and a floating figure.

Note that the "nowidow" package requires at least 4 lines for a paragraph to be broken.

An orphan line (first line of a paragraph at the bottom of a page/column) looks less ugly than a widow line (final line of a paragraph at the top of a page/column) does.

As a band-aid patch, this commit permits an orphan at the problematic paragraph by the \noclub command provided by the "nowidow" package and avoids such ugly wide spaces.
Another approach would be to add some words to the paragraph and make it 4 lines or more.

Quoted 7 lines

By this change, TeX Live 2015/Debian (on Ubuntu Xenial) with the up-to-date "epigraph" can also produce the (mostly) same output.

Do similar tweaks to avoid wide vertical spaces in a couple of other chapters.

Queued and pushed, thank you!

I also expanded the paragraph preceeding your \noclub, please check to make sure that this really fixes the problem in the other environments.

This also caused me to wonder about the two-page "think about it" gap following the introduction of Dining Philosophers. Not a problem in electronic editions, but it looks like a print edition would have a pair of pages with only "(Intentional blank page)" in the upper left. Might not be worth worrying about, though.

Thanx, Paul

Quoted 55 lines

---
Hi Paul,

As mentioned in the change log, if you add some words to the paragraph in partexercises.tex, the \noclub[1] can be removed. In the other places, the problem is not the length of the paragraph and you need different tweaks to avoid orphans. Let me see what the tweaks would be.

Thanks, Akira

 SMPdesign/partexercises.tex | 1 +
 debugging/debugging.tex     | 1 +
 locking/locking.tex         | 1 +
 3 files changed, 3 insertions(+)
SMPdesign/partexercises.tex +1 -0
index 9cebe6b7..1708da93 100644
@@ -12,6 +12,7 @@
 
 This section uses a pair of exercises (the classic Dining Philosophers
 problem and a double-ended queue) to demonstrate the value of partitioning.
+\noclub[1]
 
 \subsection{Dining Philosophers Problem}
 \label{sec:SMPdesign:Dining Philosophers Problem}
debugging/debugging.tex +1 -0
index 286f6df7..07350fe1 100644
@@ -2256,6 +2256,7 @@ Section~\ref{sec:debugging:Detecting Interference Via Measurement}
 describes methods of rejection involving additional measurements,
 while Section~\ref{sec:debugging:Detecting Interference Via Statistics}
 describes statistics-based rejection.
+\noclub[1]
 
 \subsubsection{Detecting Interference Via Measurement}
 \label{sec:debugging:Detecting Interference Via Measurement}
locking/locking.tex +1 -0
index 3c2949fa..8a1a3101 100644
@@ -1010,6 +1010,7 @@ Therefore CPU~1 will likely acquire the lock.
 If CPU~1 holds the lock long enough for CPU~0 to be requesting the
 lock by the time CPU~1 releases it and vice versa, the lock can
 shuttle between CPUs~0 and~1, bypassing CPUs~2--7.
+\noclub[1]
 
 \QuickQuiz{}
 	Wouldn't it be better just to use a good parallel design
Signature · 1 line
2.17.1
#2 lore raw
Quoted 35 lines · Paul E. McKenney
Quoted 34 lines · Akira Yokosawa
Quoted 1 line

From 6ad4c736867394d765a4b50aba907ef0dd8420ba Mon Sep 17 00:00:00 2001

From: Akira Yokosawa <[email protected]>
Date: Thu, 6 Feb 2020 22:16:28 +0900
Subject: [PATCH] Permit occasional orphans

Recent update of upstream LaTeX caused excessively wide spaces between paragraphs in 2c layout similar to the issue mentioned in the change log of commit 4c6ee39761a0 ("Remove required version of 'epigraph'") at the beginning of Chapter 6.

The root cause of the unstable behavior is the constraints imposed by the unfortunate combination of a fairly tall unbreakable block (consisting of a section heading, a section epigraph, a paragraph of only 3 lines), a footnote, and a floating figure.

Note that the "nowidow" package requires at least 4 lines for a paragraph to be broken.

An orphan line (first line of a paragraph at the bottom of a page/column) looks less ugly than a widow line (final line of a paragraph at the top of a page/column) does.

As a band-aid patch, this commit permits an orphan at the problematic paragraph by the \noclub command provided by the "nowidow" package and avoids such ugly wide spaces.
Another approach would be to add some words to the paragraph and make it 4 lines or more.

By this change, TeX Live 2015/Debian (on Ubuntu Xenial) with the up-to-date "epigraph" can also produce the (mostly) same output.

Do similar tweaks to avoid wide vertical spaces in a couple of other chapters.

Quoted 6 lines
Quoted 1 line

Queued and pushed, thank you!

I also expanded the paragraph preceeding your \noclub, please check to make sure that this really fixes the problem in the other environments.

Yes, now the beginning of Section 6.1 fits in the left column of the page on both the up-to-date TeX Live 2019 and TeX Live 2015/Debian with the up-to-date "epigraph".

Quoted 5 lines

This also caused me to wonder about the two-page "think about it" gap
following the introduction of Dining Philosophers. Not a problem in> electronic editions, but it looks like a print edition would have a pair of pages with only "(Intentional blank page)" in the upper left. Might
not be worth worrying about, though.

Ah, blank pages on odd and even pages do look strange.
IIUC, a pair of odd and even pages are printed on both side of a paper.
If the question is on an even page, to prevent the answer from being spotted early, it should not be on the next (odd) page but on the next even page. If the question is on an odd page, the answer may be on the other side (even page) without any blank page for print edition.

Is my understanding of the problem correct?

So we need to make the added blank page(s) conditional to Edition type, don't we?

Hopefully I might be able to come up some way to do this soon enough.

Thanks, Akira

Quoted 58 lines

Thanx, Paul

Quoted 55 lines

---
Hi Paul,

As mentioned in the change log, if you add some words to the paragraph in partexercises.tex, the \noclub[1] can be removed. In the other places, the problem is not the length of the paragraph and you need different tweaks to avoid orphans. Let me see what the tweaks would be.

Thanks, Akira

 SMPdesign/partexercises.tex | 1 +
 debugging/debugging.tex     | 1 +
 locking/locking.tex         | 1 +
 3 files changed, 3 insertions(+)
SMPdesign/partexercises.tex +1 -0
index 9cebe6b7..1708da93 100644
@@ -12,6 +12,7 @@
 
 This section uses a pair of exercises (the classic Dining Philosophers
 problem and a double-ended queue) to demonstrate the value of partitioning.
+\noclub[1]
 
 \subsection{Dining Philosophers Problem}
 \label{sec:SMPdesign:Dining Philosophers Problem}
debugging/debugging.tex +1 -0
index 286f6df7..07350fe1 100644
@@ -2256,6 +2256,7 @@ Section~\ref{sec:debugging:Detecting Interference Via Measurement}
 describes methods of rejection involving additional measurements,
 while Section~\ref{sec:debugging:Detecting Interference Via Statistics}
 describes statistics-based rejection.
+\noclub[1]
 
 \subsubsection{Detecting Interference Via Measurement}
 \label{sec:debugging:Detecting Interference Via Measurement}
locking/locking.tex +1 -0
index 3c2949fa..8a1a3101 100644
@@ -1010,6 +1010,7 @@ Therefore CPU~1 will likely acquire the lock.
 If CPU~1 holds the lock long enough for CPU~0 to be requesting the
 lock by the time CPU~1 releases it and vice versa, the lock can
 shuttle between CPUs~0 and~1, bypassing CPUs~2--7.
+\noclub[1]
 
 \QuickQuiz{}
 	Wouldn't it be better just to use a good parallel design
Signature · 1 line
2.17.1
#3 lore raw
Quoted 38 lines · Akira Yokosawa
Quoted 37 lines · Paul E. McKenney
Quoted 35 lines · Akira Yokosawa
Quoted 1 line

From 6ad4c736867394d765a4b50aba907ef0dd8420ba Mon Sep 17 00:00:00 2001

From: Akira Yokosawa <[email protected]>
Date: Thu, 6 Feb 2020 22:16:28 +0900
Subject: [PATCH] Permit occasional orphans

Recent update of upstream LaTeX caused excessively wide spaces between paragraphs in 2c layout similar to the issue mentioned in the change log of commit 4c6ee39761a0 ("Remove required version of 'epigraph'") at the beginning of Chapter 6.

The root cause of the unstable behavior is the constraints imposed by the unfortunate combination of a fairly tall unbreakable block (consisting of a section heading, a section epigraph, a paragraph of only 3 lines), a footnote, and a floating figure.

Note that the "nowidow" package requires at least 4 lines for a paragraph to be broken.

An orphan line (first line of a paragraph at the bottom of a page/column) looks less ugly than a widow line (final line of a paragraph at the top of a page/column) does.

As a band-aid patch, this commit permits an orphan at the problematic paragraph by the \noclub command provided by the "nowidow" package and avoids such ugly wide spaces.
Another approach would be to add some words to the paragraph and make it 4 lines or more.

By this change, TeX Live 2015/Debian (on Ubuntu Xenial) with the up-to-date "epigraph" can also produce the (mostly) same output.

Do similar tweaks to avoid wide vertical spaces in a couple of other chapters.

Quoted 8 lines
Quoted 4 lines

Queued and pushed, thank you!

I also expanded the paragraph preceeding your \noclub, please check to make sure that this really fixes the problem in the other environments.

Yes, now the beginning of Section 6.1 fits in the left column of the page on both the up-to-date TeX Live 2019 and TeX Live 2015/Debian with the up-to-date "epigraph".

Very good, thank you!

Quoted 8 lines
Quoted 4 lines

This also caused me to wonder about the two-page "think about it" gap
following the introduction of Dining Philosophers. Not a problem in> electronic editions, but it looks like a print edition would have a pair of pages with only "(Intentional blank page)" in the upper left. Might
not be worth worrying about, though.

Ah, blank pages on odd and even pages do look strange. IIUC, a pair of odd and even pages are printed on both side of a paper.

Yes, for example, on one of the printed copies of the first edition, pages 217 and 218 are on opposite sides of the same sheet of paper.

Quoted 6 lines

If the question is on an even page, to prevent the answer from being spotted early, it should not be on the next (odd) page but on the next even page. If the question is on an odd page, the answer may be on the other side (even page) without any blank page for print edition.

Is my understanding of the problem correct?

Sounds correct to me!

Quoted 2 lines

So we need to make the added blank page(s) conditional to Edition type, don't we?

Quite possibly, but on the other hand people do occasionally print random versions of the book. So it would be better to assume that any random git commit might be printed.

Quoted 1 line

Hopefully I might be able to come up some way to do this soon enough.

Sounds very good! Not critically important or urgent, but it would be nice to have.

Thanx, Paul

Quoted 60 lines

Thanks, Akira

Quoted 58 lines

Thanx, Paul

Quoted 55 lines

---
Hi Paul,

As mentioned in the change log, if you add some words to the paragraph in partexercises.tex, the \noclub[1] can be removed. In the other places, the problem is not the length of the paragraph and you need different tweaks to avoid orphans. Let me see what the tweaks would be.

Thanks, Akira

 SMPdesign/partexercises.tex | 1 +
 debugging/debugging.tex     | 1 +
 locking/locking.tex         | 1 +
 3 files changed, 3 insertions(+)
SMPdesign/partexercises.tex +1 -0
index 9cebe6b7..1708da93 100644
@@ -12,6 +12,7 @@
 
 This section uses a pair of exercises (the classic Dining Philosophers
 problem and a double-ended queue) to demonstrate the value of partitioning.
+\noclub[1]
 
 \subsection{Dining Philosophers Problem}
 \label{sec:SMPdesign:Dining Philosophers Problem}
debugging/debugging.tex +1 -0
index 286f6df7..07350fe1 100644
@@ -2256,6 +2256,7 @@ Section~\ref{sec:debugging:Detecting Interference Via Measurement}
 describes methods of rejection involving additional measurements,
 while Section~\ref{sec:debugging:Detecting Interference Via Statistics}
 describes statistics-based rejection.
+\noclub[1]
 
 \subsubsection{Detecting Interference Via Measurement}
 \label{sec:debugging:Detecting Interference Via Measurement}
locking/locking.tex +1 -0
index 3c2949fa..8a1a3101 100644
@@ -1010,6 +1010,7 @@ Therefore CPU~1 will likely acquire the lock.
 If CPU~1 holds the lock long enough for CPU~0 to be requesting the
 lock by the time CPU~1 releases it and vice versa, the lock can
 shuttle between CPUs~0 and~1, bypassing CPUs~2--7.
+\noclub[1]
 
 \QuickQuiz{}
 	Wouldn't it be better just to use a good parallel design
Signature · 1 line
2.17.1
#4 lore raw
Quoted 55 lines · Paul E. McKenney
Quoted 38 lines · Akira Yokosawa
Quoted 37 lines · Paul E. McKenney
Quoted 35 lines · Akira Yokosawa
Quoted 1 line

From 6ad4c736867394d765a4b50aba907ef0dd8420ba Mon Sep 17 00:00:00 2001

From: Akira Yokosawa <[email protected]>
Date: Thu, 6 Feb 2020 22:16:28 +0900
Subject: [PATCH] Permit occasional orphans

Recent update of upstream LaTeX caused excessively wide spaces between paragraphs in 2c layout similar to the issue mentioned in the change log of commit 4c6ee39761a0 ("Remove required version of 'epigraph'") at the beginning of Chapter 6.

The root cause of the unstable behavior is the constraints imposed by the unfortunate combination of a fairly tall unbreakable block (consisting of a section heading, a section epigraph, a paragraph of only 3 lines), a footnote, and a floating figure.

Note that the "nowidow" package requires at least 4 lines for a paragraph to be broken.

An orphan line (first line of a paragraph at the bottom of a page/column) looks less ugly than a widow line (final line of a paragraph at the top of a page/column) does.

As a band-aid patch, this commit permits an orphan at the problematic paragraph by the \noclub command provided by the "nowidow" package and avoids such ugly wide spaces.
Another approach would be to add some words to the paragraph and make it 4 lines or more.

By this change, TeX Live 2015/Debian (on Ubuntu Xenial) with the up-to-date "epigraph" can also produce the (mostly) same output.

Do similar tweaks to avoid wide vertical spaces in a couple of other chapters.

Quoted 8 lines
Quoted 4 lines

Queued and pushed, thank you!

I also expanded the paragraph preceeding your \noclub, please check to make sure that this really fixes the problem in the other environments.

Yes, now the beginning of Section 6.1 fits in the left column of the page on both the up-to-date TeX Live 2019 and TeX Live 2015/Debian with the up-to-date "epigraph".

Very good, thank you!

Quoted 5 lines
Quoted 4 lines

This also caused me to wonder about the two-page "think about it" gap
following the introduction of Dining Philosophers. Not a problem in> electronic editions, but it looks like a print edition would have a pair of pages with only "(Intentional blank page)" in the upper left. Might
not be worth worrying about, though.

Quoted 6 lines
Quoted 3 lines

Ah, blank pages on odd and even pages do look strange. IIUC, a pair of odd and even pages are printed on both side of a paper.

Yes, for example, on one of the printed copies of the first edition, pages 217 and 218 are on opposite sides of the same sheet of paper.

Maybe commit 67aae72180cb ("SMPdesign: Restore effect of \cleardoublepage") has something to do with this issue.

Quoted 8 lines
Quoted 7 lines

If the question is on an even page, to prevent the answer from being spotted early, it should not be on the next (odd) page but on the next even page. If the question is on an odd page, the answer may be on the other side (even page) without any blank page for print edition.

Is my understanding of the problem correct?

Quoted 8 lines

Sounds correct to me!

Quoted 2 lines

So we need to make the added blank page(s) conditional to Edition type, don't we?

Quite possibly, but on the other hand people do occasionally print random versions of the book. So it would be better to assume that any random git commit might be printed.

So, rather than

Quoted 2 lines
Quoted 2 lines

If the question is on an odd page, the answer may be on the other side (even page) without any blank page for print edition.

, the rule would be:

Quoted 2 lines
Quoted 2 lines

If the question is on an odd page, the answer should be on a even page after 2 blank pages in between.

Does this sound good?

Thanks, Akira

Quoted 13 lines
Quoted 2 lines

Hopefully I might be able to come up some way to do this soon enough.

Sounds very good! Not critically important or urgent, but it would be nice to have.

Thanx, Paul

Quoted 5 lines

Thanks, Akira

Quoted 3 lines

Thanx, Paul

[...]

#5 lore raw
Quoted 83 lines · Akira Yokosawa
Quoted 55 lines · Paul E. McKenney
Quoted 38 lines · Akira Yokosawa
Quoted 37 lines · Paul E. McKenney
Quoted 35 lines · Akira Yokosawa
Quoted 1 line

From 6ad4c736867394d765a4b50aba907ef0dd8420ba Mon Sep 17 00:00:00 2001

From: Akira Yokosawa <[email protected]>
Date: Thu, 6 Feb 2020 22:16:28 +0900
Subject: [PATCH] Permit occasional orphans

Recent update of upstream LaTeX caused excessively wide spaces between paragraphs in 2c layout similar to the issue mentioned in the change log of commit 4c6ee39761a0 ("Remove required version of 'epigraph'") at the beginning of Chapter 6.

The root cause of the unstable behavior is the constraints imposed by the unfortunate combination of a fairly tall unbreakable block (consisting of a section heading, a section epigraph, a paragraph of only 3 lines), a footnote, and a floating figure.

Note that the "nowidow" package requires at least 4 lines for a paragraph to be broken.

An orphan line (first line of a paragraph at the bottom of a page/column) looks less ugly than a widow line (final line of a paragraph at the top of a page/column) does.

As a band-aid patch, this commit permits an orphan at the problematic paragraph by the \noclub command provided by the "nowidow" package and avoids such ugly wide spaces.
Another approach would be to add some words to the paragraph and make it 4 lines or more.

By this change, TeX Live 2015/Debian (on Ubuntu Xenial) with the up-to-date "epigraph" can also produce the (mostly) same output.

Do similar tweaks to avoid wide vertical spaces in a couple of other chapters.

Quoted 8 lines
Quoted 4 lines

Queued and pushed, thank you!

I also expanded the paragraph preceeding your \noclub, please check to make sure that this really fixes the problem in the other environments.

Yes, now the beginning of Section 6.1 fits in the left column of the page on both the up-to-date TeX Live 2019 and TeX Live 2015/Debian with the up-to-date "epigraph".

Very good, thank you!

Quoted 5 lines
Quoted 4 lines

This also caused me to wonder about the two-page "think about it" gap
following the introduction of Dining Philosophers. Not a problem in> electronic editions, but it looks like a print edition would have a pair of pages with only "(Intentional blank page)" in the upper left. Might
not be worth worrying about, though.

Quoted 6 lines
Quoted 3 lines

Ah, blank pages on odd and even pages do look strange. IIUC, a pair of odd and even pages are printed on both side of a paper.

Yes, for example, on one of the printed copies of the first edition, pages 217 and 218 are on opposite sides of the same sheet of paper.

Maybe commit 67aae72180cb ("SMPdesign: Restore effect of \cleardoublepage") has something to do with this issue.

Quoted 8 lines
Quoted 7 lines

If the question is on an even page, to prevent the answer from being spotted early, it should not be on the next (odd) page but on the next even page. If the question is on an odd page, the answer may be on the other side (even page) without any blank page for print edition.

Is my understanding of the problem correct?

Quoted 8 lines

Sounds correct to me!

Quoted 2 lines

So we need to make the added blank page(s) conditional to Edition type, don't we?

Quite possibly, but on the other hand people do occasionally print random versions of the book. So it would be better to assume that any random git commit might be printed.

Quoted 9 lines

So, rather than

Quoted 2 lines
Quoted 2 lines

If the question is on an odd page, the answer may be on the other side (even page) without any blank page for print edition.

, the rule would be:

Quoted 2 lines
Quoted 2 lines

If the question is on an odd page, the answer should be on a even page after 2 blank pages in between.

I was somewhat confused. The right approach for us seems to be:

Regardless of where the question is placed, the answer should come after a gap of a single blank page.

For print editions, this rule results in an unnecessary blank page when the question is on an even page, which still looks acceptable.

I'm submitting a patch with your Reported-by for you to test.

Thanks, Akira

Quoted 20 lines

Does this sound good?

Thanks, Akira

Quoted 13 lines
Quoted 2 lines

Hopefully I might be able to come up some way to do this soon enough.

Sounds very good! Not critically important or urgent, but it would be nice to have.

Thanx, Paul

Quoted 5 lines

Thanks, Akira

Quoted 3 lines

Thanx, Paul

[...]