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

    Function createMathRenderer

    Mathematics. createMathRenderer is what a caller builds and hands to compile() through CompileOptions.math; it is exported from the package root because a caller cannot obtain one any other way, and the engine — which acquires nothing for itself — will not build one for them.

    The static import graph reaching this line is small: math/bridge.ts names mathjax only in an import type and an await import(), so requiring @ebook-reader/typeset still costs a caller who sets no mathematics nothing.

    • Build a renderer. Async once, per process — init() reads MathJax's components off disk, and calling it a second time with the same config returns the same instance rather than doing the work twice.

      Nothing here throws for a document reason. It can still reject if MathJax itself cannot be loaded at all, which is a deployment problem and not something a diagnostic can usefully describe.

      Returns Promise<MathRenderer>