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

    Function createLayoutContext

    Vertical-list assembly: the document model becomes one tall column.

    • Parameters

      • design: PageDesign
      • fonts: FontProvider
      • shaper: Shaper
      • budget: Budget
      • diagnostics: {
            code?:
                | "syntax"
                | "unsupported"
                | "undefined-command"
                | "undefined-environment"
                | "undefined-reference"
                | "duplicate-label"
                | "missing-file"
                | "missing-font"
                | "overfull-box"
                | "underfull-box"
                | "budget-exceeded"
                | "limit-exceeded"
                | "stopped"
                | "internal";
            column?: number;
            construct?: string;
            file: string;
            line: number;
            message: string;
            severity: "error"
            | "warning"
            | "info";
        }[]
      • file: string
      • pageOf: ReadonlyMap<string, number>
      • files: ImageFiles = {}

        The project's files, for \includegraphics. Optional so a caller that lays out text alone (test/fidelity.test.ts does) needs no file map; compile() always passes the real one.

      • math: MathRenderer | null = null

        The math renderer, for $…$ and display environments. Optional and defaulting to null for the same reason files is: a caller laying out prose alone needs none, and it costs nothing until a document contains mathematics. compile() passes whatever CompileOptions.math held.

      Returns LayoutContext