View Single Post
Old 05-20-2022, 08:25 AM   #16
se1961
Member
se1961 began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Apr 2016
Device: Paperwhite
Quote:
Originally Posted by davidfor View Post
You have missed something that was sort of suggested. A mention was made of widows and orphans. These are used to keep parts of a paragraph together over the end of a line. The default is 2 or 3.
Is this a setting in Calibre? I have been doing the DOCX formatting after conversion in Calibre, so chose "keep lines together," which does what I need, so I didn't bother with widows and orphans. If that setting is somewhere in Calibre, could you tell me where? I will happily experiment with it.

EDIT: I started digging through old threads and found this:

Quote:
Originally Posted by ps67 View Post
You can change the css in the calibre editor like this:
Code:
p{
widows: 1 !important;
orphans: 1 !important;
}
using !important You can overwrite eventual different widows/orphans values in the various p.something tag.
SECOND EDIT: At first the command didn't seem to help me much, but I have just played around with it a LOT, and discovered that it works extremely well to prevent lines from breaking across the page, which is my intention. In the end, I set my widows and orphans to the the number of lines on a PDF page-- in my case, 35 lines of text (setting the number higher keeps longer paragraphs together but breaks text if the paragraph ends up being longer than a page), so I use 35 for both widows and orphans.

Comparing the two outputs (DOCX with "keep lines together" and PDF with widows/orphans) it seems that widows/orphans produces many fewer line breaks across a page-- 11 vs 17 for a full novel. Thank you for this! A simpler solution!

Last edited by se1961; 05-20-2022 at 10:23 AM. Reason: Did some experimenting and found the answer ��
se1961 is offline   Reply With Quote