UNPKG

mathrok

Version:

AI-powered symbolic mathematics library combining traditional Computer Algebra System (CAS) capabilities with natural language processing for math problem solving

62 lines 1.63 kB
/** * Mathematical Notation Renderer for Mathrok * Provides LaTeX/MathML output for mathematical expressions */ /** * Math rendering options */ export interface MathRenderingOptions { format: 'latex' | 'mathml' | 'asciimath'; displayMode?: boolean; fontSize?: number; color?: string; background?: string; linebreaks?: boolean; fleqn?: boolean; leqno?: boolean; throwOnError?: boolean; macros?: Record<string, string>; } /** * Math notation renderer */ export declare class MathRenderer { private options; constructor(options?: Partial<MathRenderingOptions>); /** * Set rendering options */ setOptions(options: Partial<MathRenderingOptions>): void; /** * Convert a mathematical expression to LaTeX */ toLatex(expression: string): string; /** * Convert a mathematical expression to MathML */ toMathML(expression: string): string; /** * Convert a mathematical expression to AsciiMath */ toAsciiMath(expression: string): string; /** * Render a mathematical expression */ render(expression: string, options?: Partial<MathRenderingOptions>): string; /** * Wrap LaTeX in display or inline mode */ private wrapLatex; /** * Render a step-by-step solution */ renderSteps(steps: { text: string; expression: string; }[], options?: Partial<MathRenderingOptions>): string; /** * Generate HTML with CSS for displaying mathematical content */ generateHTML(content: string): string; } //# sourceMappingURL=math-renderer.d.ts.map