Skip to content

9.8.1

Choose a tag to compare

@dolanmiu dolanmiu released this 28 Sep 17:47
· 225 commits to master since this release
0e8ff7a

9.8.1 adds math from LaTeX to docx/math, and makes every example in the docs live.

latexToMath turns LaTeX math into equations that Word shows and edits as its own. It reads the math that LaTeX, MathJax and KaTeX write, including fractions, roots, scripts, sums and integrals, \left … \right, accents, braces, fonts, \text, and environments such as matrix, cases and align, where \tag numbers a row. It returns components, so you can mix LaTeX with math you build by hand. Anything it can't read throws an error that says what and where. See Math from LaTeX.

LaTeX needed six new components, and you can use them by hand too: MathLargeOperator, MathAccent, MathBar, MathBrace, MathBox and MathPhantom. MathRun gains style, script and literal. MathFraction gains type (stacked, skewed, linear or no bar), and MathSum and MathIntegral gain limits.

The docs' examples now run in the page with this version of docx and draw the document next to the code. You can edit the code, with completions and type errors, and download the .docx. Running all 443 examples found docs that were wrong, and they're fixed: landscape pages, custom properties, comments, and APIs that no longer exist. The sidebar also stops listing every chart page, and shows a page's child pages only once you open it.

The empty WORKAROUND2, WORKAROUND3 and WORKAROUND4 exports are gone. They were only there for awesome-typescript-loader, which docx stopped using in 2021.

What's Changed

  • fix: the API check compares the classes an entry point re-exports from docx with docx's check, not its own by @dolanmiu in #3558
  • docs: the sidebar lists a page's child pages only once that page or one of its children is open by @dolanmiu in #3557
  • feat: live examples in the docs, which run, draw the document next to the code, and can be edited and downloaded by @dolanmiu in #3556
  • build(deps-dev): bump @microsoft/api-extractor from 7.59.1 to 7.59.2 by @dependabot[bot] in #3559
  • build(deps-dev): bump vite from 8.3.0 to 8.3.1 by @dependabot[bot] in #3560
  • build(deps-dev): bump @types/inquirer from 9.0.9 to 9.0.10 by @dependabot[bot] in #3561
  • build(deps-dev): bump eslint-plugin-functional from 9.0.5 to 10.0.1 by @dependabot[bot] in #3562
  • build(deps-dev): bump cspell from 10.0.0 to 10.3.4 by @dependabot[bot] in #3568
  • build(deps-dev): bump @typescript-eslint/parser from 8.70.0 to 8.70.1 by @dependabot[bot] in #3567
  • build(deps-dev): bump jsdom from 30.1.0 to 30.1.1 by @dependabot[bot] in #3564
  • chore: remove @types/inquirer, since inquirer ships its own types by @dolanmiu in #3569
  • build(deps-dev): bump typescript-eslint from 8.70.0 to 8.70.1 by @dependabot[bot] in #3565
  • feat: math from LaTeX in docx/math, with accents, bars, braces, boxes, phantoms and large operators by @dolanmiu in #3570
  • chore: remove the awesome-typescript-loader WORKAROUND exports by @dolanmiu in #3571
  • chore: Version bump to 9.8.1 by @dolanmiu in #3572

Full Changelog: 9.8.0...9.8.1