import type { BlockConfig, BlockFromConfigNoChildren, Exporter } from "@blocknote/core"; type MathBlock = BlockFromConfigNoChildren, any, any>; type InlineMath = { type: "math"; content: string; }; /** * Typst block mapping for `@blocknote/math-block` that renders math blocks * as native Typst equations (real text, not images - the LaTeX is converted * to Typst math notation with `tex2typst`). The equation carries the LaTeX * source as its alt text, as PDF/UA requires formulas to have one. Invalid * LaTeX renders an error placeholder (mirroring the editor). * * Known limitation: `tex2typst` does not translate every valid KaTeX * command - an untranslatable one (e.g. `\coloneqq`) passes validation here * but fails the Typst *compile* with an "unknown variable" error, failing * the export loudly (deliberately: a valid formula the pipeline can't * render must not silently become something else): * * ```ts * import { mathBlockMapping } from "@blocknote/math-block/typst-exporter"; * * new TypstExporter(schema, { * ...typstDefaultSchemaMappings, * blockMapping: { * ...typstDefaultSchemaMappings.blockMapping, * mathBlock: mathBlockMapping, * }, * }); * ``` */ export declare function mathBlockMapping(block: MathBlock, exporter: Exporter): string; /** * Typst inline content mapping for `@blocknote/math-block` that renders * inline math as native Typst equations flowing with the text - see * {@link mathBlockMapping} for the conversion and alt-text details. Invalid * LaTeX renders an error placeholder (mirroring the editor): * * ```ts * import { inlineMathMapping } from "@blocknote/math-block/typst-exporter"; * * new TypstExporter(schema, { * ...typstDefaultSchemaMappings, * inlineContentMapping: { * ...typstDefaultSchemaMappings.inlineContentMapping, * math: inlineMathMapping, * }, * }); * ``` */ export declare function inlineMathMapping(inlineContent: InlineMath, exporter: Exporter): string; export {};