Skip to main content

Module linebreak

Module linebreak 

Source
Expand description

Breaking paragraphs into lines (TeX: The Program §813–§890, with e-TeX’s \lastlinefit and penalty arrays, and LuaTeX’s changes).

LuaTeX differences reproduced here:

  • before breaking, the paragraph goes through the node processing passes (hyphenation, ligatures, kerns; crate::nodeproc);
  • discretionaries carry their own penalty and hold their replacement text, so the width of a line without a break at a discretionary includes the replacement text;
  • at a chosen discretionary break, the pre-break text is placed before the (now empty) discretionary node, which stays at the end of the line; the post-break text starts the next line;
  • glue orders include fi;
  • \tracingparagraphs prints @@n: line … for new break nodes but a single @ when referring to them (via @n, -> @n).

Structs§

LineBreakInfo
What tex.linebreak reports about a paragraph it broke.
ParParams
The parameters of line breaking: the current values of TeX’s parameters for a paragraph, or those given to tex.linebreak.