![]() |
Page breaking primitives | ![]() |
The physical lines in a document are broken into pages in a way similar to how paragraphs are hyphenated into lines. The page breaker performs page filling, it tries to distribute page items evenly so text runs to the bottom of every page. It also tries to avoid orphans and widows, which are single or pairs of soft lines separated from the rest of their paragraph by a page break, but these can be produced when there is no better solution.
Prevent the occurrence of an automatic page break between the current paragraph and the next one, by setting an infinite page breaking penalty after the last line of the current paragraph, similarly to no-break.
Forbidden page breaking points are overridden by “new page” and “page break” primitives.
Similar to no-page-break, but forbid a page break between the previous paragraph and the current one.
These tags work at the level of physical lines instead of paragraphs: no-break-here forbids a page break just after the line which contains the tag, and no-break-here* forbids a page break just before it.
Forbid all page breaks between the lines which have been typeset between a no-break-start and the next no-break-end.
Cause the next line to appear on a new page, without filling the current page. The page breaker will not try to position the current line at the bottom of the page.
Similar to new-page, but start the new page before the current line. This directive is appropriate to use in chapter headings.
Force a page break after the current line. A forced page break is different from a new page, the page breaker will try to position the current line at the bottom of the page.
Use only to fine-tune the automatic page breaking. Ideally, this should be a hint similar to line-break, but this is implemented as a directive, use only with extreme caution.
Similar to page-break, but force a page break before the current line.
Similar to new-page and new-page*, but the new page is always an odd-numbered (right-hand) page: an empty page is inserted when necessary.
When several “new page” and “page break” directives apply to the same point in the document, only the first one is effective. Any new-page or page-break after the first one in a line is ignored. Any new-page or page-break in a line overrides any new-page* or page-break* in the following line. Any new-page* or page-break* after the first one in a line is ignored.
The content is only displayed if a page break occurs at this point, in which case it is typeset at the top of the new page. For instance, the index macros of
std-automatic.ts
use an if-page-break tag with where equal to t in order to repeat the main index entry at the top of a page when its subentries are split across pages. The evaluated where argument is passed to the page breaker together with the content. This primitive is only taken into account by the new page breaker, which is enabled by default through the new style page breaking preference.