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

    Interface LineBreakParams

    interface LineBreakParams {
        adjDemerits: number;
        at: SourceRef;
        doubleHyphenDemerits: number;
        emergencyStretch: number;
        finalHyphenDemerits: number;
        finish: boolean;
        hbadness: number;
        hfuzz: number;
        hyphenate: boolean;
        hyphenateFont: ((font: FontHandle, size: number) => boolean) | null;
        hyphenator: Hyphenator | null;
        hyphenPenalty: number;
        leftSkip: Glue;
        linePenalty: number;
        pretolerance: number;
        rightSkip: Glue;
        shaper: Shaper | null;
        tolerance: number;
    }
    Index
    adjDemerits: number

    \adjdemerits — charged when adjacent lines differ by two fitness classes. Plain TeX's 10000.

    Where the paragraph came from, for diagnostics.

    doubleHyphenDemerits: number

    \doublehyphendemerits — charged for two hyphenated lines in a row. Plain TeX's 10000.

    emergencyStretch: number

    \emergencystretch — extra stretch pretended into every line on a third pass, used only when the second pass finds nothing tolerable. Plain TeX's 0pt: off, so a hopeless paragraph goes overfull rather than loose.

    finalHyphenDemerits: number

    \finalhyphendemerits — charged when the penultimate line ends in a hyphen. Plain TeX's 5000.

    finish: boolean

    Append \penalty10000 \parfillskip if the list does not already end that way. Leave it on unless the caller finishes its own paragraphs.

    hbadness: number

    \hbadness — badness above which an underfull line is reported. Plain TeX's 1000.

    hfuzz: number

    \hfuzz — overflow below which an overfull line is not reported. Plain TeX's 0.1pt.

    hyphenate: boolean

    Insert discretionaries on the second pass. false breaks on spaces only.

    hyphenateFont: ((font: FontHandle, size: number) => boolean) | null

    Whether a face may be hyphenated — TeX's \hyphenchar\font >= 0. Defaults to "yes, always"; the document stage should say no for typewriter type, where a hyphen would read as part of the code.

    hyphenator: Hyphenator | null

    Which hyphenator to use. Defaults to TeX's en-US patterns.

    hyphenPenalty: number

    \hyphenpenalty — cost of a break at an automatic hyphen, plain TeX's 50. Used when the discretionaries are inserted, so it is what lands in Discretionary.penalty; a discretionary already in the list keeps its own. (\exhyphenpenalty, the cost of breaking after a hyphen the author typed, is set the same way — see TextRunOptions in hlist.ts.)

    leftSkip: Glue

    \leftskip / \rightskip, glue added at the two ends of every line. Both are zero for justified text. Ragged right is rightSkip: glue(0, 1, 0, 1) — the fil swallows the whole shortfall, so every line is badness 0 and the breaker optimises on penalties alone.

    linePenalty: number

    \linepenalty — added to every line's badness before squaring, so that among two equally-loose breakings the one with fewer lines wins. Plain TeX's 10.

    pretolerance: number

    \pretolerance — the threshold for the first pass, which does not hyphenate. Plain TeX's 100. Negative skips the first pass entirely, which is what \sloppy-style setups do.

    rightSkip: Glue
    shaper: Shaper | null

    Shared measurement cache. Pass one across a whole document and every word is shaped once; omit it and each paragraph gets its own.

    tolerance: number

    \tolerance — the worst badness a line may have and still be used. Plain TeX and LaTeX both default to 200, which is a ratio of about 1.26.