# asciimathml-ts

> AsciiMathML converted to TS, suitable for server

Latest version **2.0.1** (published 2026-05-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install asciimathml-ts
pnpm add asciimathml-ts
yarn add asciimathml-ts
bun add asciimathml-ts
```

## Health

**Score 55/100 (C)** — status: active.

Positive: has types; no vulnerabilities; high maintenance score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2026-05-16 |
| First published | 2021-02-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 138.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | tberend |
| Keywords | MathML, ASCIIMath, ASCIIMathML, TypeScript |

## Links

- npm: https://www.npmjs.com/package/asciimathml-ts
- Repository: https://github.com/tom-berend/asciimathml-ts
- Homepage: https://github.com/tom-berend/asciimathml-ts#readme
- Issues: https://github.com/tom-berend/asciimathml-ts/issues
- npm.io page: https://npm.io/package/asciimathml-ts

## Dependencies (1)

- [typescript](https://npm.io/package/typescript.md) ^6.0.3

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2026-05-16
- 2.0.0 — 2026-05-16
- 1.0.2 — 2026-02-01
- 1.0.1 — 2021-02-18
- 1.0.0 — 2021-02-18

## README

asciimathml-ts
===========

A port of ASCIIMathML.js that converts AsciiMath equations into HTML strings, suitable for server-side.

ASCIIMathML compiles equations into MathML.  The original [ASCIIMathML](https://github.com/asciimath/asciimathml) used DOM nodes to process the hierarchial structure. This is convenient, since the output was a MathML node-tree, and ASCIIMathML provides MathJax-like rendering daemons.  It's a terrific package.

But it is slow; compiling a moderate equation requires processing and discarding hundreds of DOM nodes.  And it can only run in the browser.  I needed a server version that compiled equations into HTML strings.


This version is based on the April 2026 version of ASCIIMathML, which added bold() and expands the special characters.



## Usage
```
import { AMserver } from './asciimath.js';
let am = new AMserver()
html += am.parseMath('a^b +c')

let d = document.getElementById('test')
d.innerHTML =  html


```

---
_Source: https://npm.io/package/asciimathml-ts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
