Skip to content

getDefaultMathConfig()

ts
function getDefaultMathConfig<T extends MathBackend, CA extends 'cdn' | 'hybrid' | 'none' = T extends 'mathjax'
        ? 'hybrid'
        : T extends 'katex'
          ? 'cdn'
          : 'none'>(mathBackend: T, ca: CA): FullMathConfiguration<T>;

Get the default configuration for a given math backend.

Type parameters

  • T extends MathBackend — The math backend.
  • CA extends 'cdn' | 'hybrid' | 'none' = T extends 'mathjax' ? 'hybrid' : T extends 'katex' ? 'cdn' : 'none' — The "CSS approach" (corresponds to math.css.type); inferred from the backend when omitted.

Parameters

mathBackend Tbase/defaults.ts:74

Math backend.

ca CAbase/defaults.ts:75-79

"CSS approach" — this corresponds to the math.css.type setting.

Returns

FullMathConfiguration<T>

The default configuration for the given math backend and CSS approach.