mathpix-markdown-it
Version:
Mathpix-markdown-it is an open source implementation of the mathpix-markdown spec written in Typescript. It relies on the following open source libraries: MathJax v3 (to render math with SVGs), markdown-it (for standard Markdown parsing)
589 lines (588 loc) • 13.1 kB
TypeScript
export declare enum eSymbolType {
operation = "operation",
relation = "relation",
logical = "logical",
miscellaneous = "miscellaneous",
arrow = "arrow"
}
export declare const AMsymbols: ({
input: string;
tag: string;
output: string;
tex: string;
ttype: number;
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: string;
ttype: number;
symbolType: eSymbolType;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: any;
ttype: number;
invisible: boolean;
symbolType?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: any;
ttype: number;
acc: boolean;
stretchy: boolean;
symbolType: eSymbolType;
invisible?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: any;
ttype: number;
func: boolean;
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: any;
ttype: number;
rewriteleftright: string[];
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: any;
ttype: number;
acc: boolean;
stretchy: boolean;
symbolType?: undefined;
invisible?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: string;
ttype: number;
acc: boolean;
symbolType?: undefined;
invisible?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
output_linear: string;
tex: string;
ttype: number;
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
ttype: number;
output?: undefined;
tex?: undefined;
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
atname: string;
atval: string;
output: string;
tex: any;
ttype: number;
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
atname: string;
atval: string;
output: string;
tex: any;
ttype: number;
codes: string[];
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
})[];
export declare const getFunctions: () => Array<string>;
export declare const regExpIsFunction: RegExp;
export declare const findAmSymbolByTag: (tag: string, output: string) => {
input: string;
tag: string;
output: string;
tex: string;
ttype: number;
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: string;
ttype: number;
symbolType: eSymbolType;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: any;
ttype: number;
invisible: boolean;
symbolType?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: any;
ttype: number;
acc: boolean;
stretchy: boolean;
symbolType: eSymbolType;
invisible?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: any;
ttype: number;
func: boolean;
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: any;
ttype: number;
rewriteleftright: string[];
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: any;
ttype: number;
acc: boolean;
stretchy: boolean;
symbolType?: undefined;
invisible?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: string;
ttype: number;
acc: boolean;
symbolType?: undefined;
invisible?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
output_linear: string;
tex: string;
ttype: number;
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
ttype: number;
output?: undefined;
tex?: undefined;
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
atname: string;
atval: string;
output: string;
tex: any;
ttype: number;
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
atname: string;
atval: string;
output: string;
tex: any;
ttype: number;
codes: string[];
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
};
export declare const findAmSymbolByTagStretchy: (tag: string, output: string) => {
input: string;
tag: string;
output: string;
tex: string;
ttype: number;
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: string;
ttype: number;
symbolType: eSymbolType;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: any;
ttype: number;
invisible: boolean;
symbolType?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: any;
ttype: number;
acc: boolean;
stretchy: boolean;
symbolType: eSymbolType;
invisible?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: any;
ttype: number;
func: boolean;
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: any;
ttype: number;
rewriteleftright: string[];
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: any;
ttype: number;
acc: boolean;
stretchy: boolean;
symbolType?: undefined;
invisible?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
tex: string;
ttype: number;
acc: boolean;
symbolType?: undefined;
invisible?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
output: string;
output_linear: string;
tex: string;
ttype: number;
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
ttype: number;
output?: undefined;
tex?: undefined;
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
atname?: undefined;
atval?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
atname: string;
atval: string;
output: string;
tex: any;
ttype: number;
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
codes?: undefined;
} | {
input: string;
tag: string;
atname: string;
atval: string;
output: string;
tex: any;
ttype: number;
codes: string[];
symbolType?: undefined;
invisible?: undefined;
acc?: undefined;
stretchy?: undefined;
func?: undefined;
rewriteleftright?: undefined;
output_linear?: undefined;
};