PreTeXtBook / pretext

PreTeXt: an authoring and publishing system for scholarly documents
https://pretextbook.org
Other
268 stars 210 forks source link

Page break element in publisher file #2213

Open kcrisman opened 4 months ago

kcrisman commented 4 months ago

See this pretext-support thread at the end for discussion of an automatic way to handle desired page breaks that might happen in a pdf conversion. Here is the idea from @Alex-Jordan

In the publisher file, latex element, a pagebreaks element. It has one attribute that is a space-separated list of xml:ids. During assembly, following each element with an xml:I'd from this list, a pi:pagebreak is inserted. And then acted on in latex as a \newpage or something. This makes it a publisher duty, not author. And you could maintain several different publisher files (letter vs a4? PDF for print vs for screen? etc.) Without worrying about turning certain pagebreaks on and off in the author's source as the publisher tries to make different versions.

@rbeezer commented

I think I'd allow for multiple such elements, maybe a publisher wants one per chapter, just to stay organized. (Might not fit with Alex's new publisher-attribute scheme, but not too rough to organize anyway.)

sean-fitzpatrick commented 4 months ago

A related issue that could be handled in the same way: the need to occasionally enlarge a page by one or two lines to avoid a page break that strands a single line of text on the following page.

(In LaTeX one might add a line like \enlargethispage{2\baselineskip})