Atrium — shared contracts and the typesetting engine
    Preparing search index...

    Function breakParagraph

    Line breaking and glue setting. model.ts's vocabulary is already exported above.

    • Break a paragraph into lines.

      hlist is the paragraph as boxes, glue and penalties — see hlist.ts for how to build one. lineWidths is the measure. Returns packed HBox lines whose glue is already set, plus the breaks that produced them and any diagnostics the paragraph earned.

      It never throws and always returns at least one line: a paragraph that cannot be broken acceptably comes back overfull, with an overfull-box diagnostic naming the overflow. That is TeX's behaviour and it is the right one — a line a human can see sticking into the margin is fixable; a crash is not.

      Parameters

      Returns LineBreakResult