From c7b1f84b7801a29dffdfa3db0ff35de289db80c0 Mon Sep 17 00:00:00 2001 From: Erik Demaine Date: Mon, 17 Apr 2023 13:49:22 -0400 Subject: [PATCH] feat: __defineFunction API exposing internal defineFunction (#3805) For making KaTeX libraries. Fixes #3756 --- katex.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/katex.js b/katex.js index 8312d2b043..5fc3123bb8 100644 --- a/katex.js +++ b/katex.js @@ -28,6 +28,7 @@ import type {AnyParseNode} from "./src/parseNode"; import type {DomSpan} from "./src/domTree"; import {defineSymbol} from './src/symbols'; +import defineFunction from './src/defineFunction'; import defineMacro from './src/defineMacro'; import {setFontMetrics} from './src/fontMetrics'; @@ -196,6 +197,12 @@ export default { * adds a new symbol to builtin symbols table */ __defineSymbol: defineSymbol, + /** + * adds a new function to builtin function list, + * which directly produce parse tree elements + * and have their own html/mathml builders + */ + __defineFunction: defineFunction, /** * adds a new macro to builtin macro list */