katex_dart 0.1.1 copy "katex_dart: ^0.1.1" to clipboard
katex_dart: ^0.1.1 copied to clipboard

A pure-Dart port of KaTeX. Parses LaTeX math to a backend-agnostic box tree and serializes it to SVG — no Flutter dependency.

Changelog #

0.1.1 #

  • Bump args to ^2.7.0, meta to ^1.18.3

0.1.0 #

Initial release. A fresh pure-Dart port of KaTeX — no Flutter dependency.

  • Pipeline: Lexer → MacroExpander → Parser → parse-node AST → builders → backend-agnostic box tree → SVG.
  • Public API: renderToBox(tex, {options}) and renderToSvg(tex, {options}) + KatexOptions.
  • CLI: dart run katex_dart "\frac{a}{b}" emits self-contained SVG.
  • Coverage: fractions, sub/superscripts (+ primes), roots (+ index), big operators (\sum/\int/\prod/\oint/\bigcup) with limits/nolimits, \left…\right and sized delimiters, accents (incl. stretchy \widehat/\vec/\overrightarrow), fonts (\mathbf/\mathbb/\mathcal/…), colors, sizing/styling, spacing, and environments (matrix/pmatrix/bmatrix/aligned/cases).
  • Verified against original KaTeX (pinned 0.17.0): box dimensions match the KaTeX oracle on the full test gallery within tolerance (most exactly).
  • Vendored KaTeX fonts (SIL OFL) embedded in SVG output via @font-face.

Stretchy delimiters/accents beyond the Size4 glyph and the full macro set are incremental follow-ups.

0
likes
160
points
142
downloads

Documentation

API reference

Publisher

verified publisherroszkowski.dev

Weekly Downloads

A pure-Dart port of KaTeX. Parses LaTeX math to a backend-agnostic box tree and serializes it to SVG — no Flutter dependency.

Homepage
Repository (GitHub)
View/report issues

Topics

#latex #katex #math #svg #rendering

License

MIT (license)

Dependencies

args, meta

More

Packages that depend on katex_dart