0 votes
For recording I would like to hand out each reader their chapter(s) to read on separate pages, in such a way that paragraphs are never split across pages.

Printing out each chapter on a new page works well by adding '\\c ' > '\\pb\\c ' in the changes.txt. (Thanks for that hint I found in this forum!)

However I haven't found a way to prevent paragraphs from breaking across pages. Is there a way to accomplish this? I would find that very helpful!

Thanks for any help!
Roland
PTXprint ago by (238 points)

1 Answer

0 votes
Add (to your ptxprint-mods.tex) the following line:

\interlinepenalty 10000

Which should (I tested it) disable all paragraph breaking, including where you want it because the page length will overflow otherwise. You could thus do something like this instead:


\def\NoSplitParagraphs{\interlinepenalty 10000}
\def\AllowSplitParagraphs{\interlinepenalty 9999}
\NoSplitParagraphs

and then add some changes.txt rules that do things like:

at ROM 94:12 "\\p" > "\\p\\AllowSplitParagraphs"
at ROM 96:1 "\\p" > "\\p\\NoSplitParagraphs"

(You cannot put \interlinepenalty 1000 directly into the USFM, because TeX is told to treat numbers as letters in USFM, in order to allow \s1 etc)
ago by (885 points)
But you don't want to do that. What if you have too much text for a page, what is TeX supposed to do? If you block all page breaks it has to overfill the page and run off the end of the PDF page and text will be lost. This is why TeX doesn't really like you doing that kind of thing. If TeX is breaking the pages in the wrong place, that is a different question. But it's not suddenly going to resize the text to fit it on the page just because you say not to break the page. It will just run off the bottom and lose text. Not good.

Related questions

Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
Don’t you know that you yourselves are God’s temple and that God’s Spirit dwells in your midst?
1 Corinthians 3:16
2,703 questions
5,480 answers
5,127 comments
1,542 users