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)
19 lines (18 loc) • 717 B
TypeScript
import { RuleInline } from 'markdown-it';
export interface IParseImageParams {
attr: Array<Array<string>>;
align: string;
latex: string;
}
export declare const parseImageParams: (str: string, align?: string) => IParseImageParams | null;
/** Process 
* Replace image inline rule:
* Process:
* 
* {width=50%}
* {width="10px"}
* {width="20px",height="20px"}
* {width="20px",height="20px",right}
* */
export declare const imageWithSize: RuleInline;
export declare const renderRuleImage: (tokens: any, idx: any, options: any, env: any, slf: any) => any;