mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 11:42:17 +00:00
11 lines
439 B
TypeScript
11 lines
439 B
TypeScript
import { layoutMath } from "./layout"
|
|
import { parseLatex } from "./parser"
|
|
import type { MathLayout, RenderLatexOptions } from "./types"
|
|
|
|
export function renderLatex(source: string, options: RenderLatexOptions = {}): MathLayout {
|
|
return layoutMath(parseLatex(source, options), options)
|
|
}
|
|
|
|
export function renderLatexToString(source: string, options: RenderLatexOptions = {}): string {
|
|
return renderLatex(source, options).toString()
|
|
}
|