# mathlive-tera

> A web component for math input

Latest version **0.120.10** (published 2026-08-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install mathlive-tera
pnpm add mathlive-tera
yarn add mathlive-tera
bun add mathlive-tera
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.120.10 |
| Published | 2026-08-02 |
| First published | 2023-10-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=21.0.0 |
| Dependencies | 1 |
| Unpacked size | 4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2162 |
| Author | Arno Gourdol |
| Maintainers | mauhieu12 |
| Keywords | math, editor, javascript, math-editing, cortex, compute engine, virtual keyboard, math keyboard, latex, tex, mathjax, katex, mathquill |

## Links

- npm: https://www.npmjs.com/package/mathlive-tera
- Repository: https://github.com/arnog/mathlive
- Homepage: https://github.com/arnog/mathlive#readme
- Issues: https://github.com/arnog/mathlive/issues/
- Funding: https://paypal.me/arnogourdol
- npm.io page: https://npm.io/package/mathlive-tera

## Dependencies (1)

- [@cortex-js/compute-engine](https://npm.io/package/@cortex-js/compute-engine.md) 0.30.2

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 0.120.10 (latest) — 2026-08-02
- 0.120.12-lite (lite) — 2026-08-05
- 0.120.11-lite — 2026-08-02
- 0.120.10-lite — 2026-08-02
- 0.120.9-lite — 2026-08-02
- 0.120.8-lite — 2026-04-18
- 0.120.7-lite — 2026-04-18
- 0.120.6-lite — 2026-04-18
- 0.120.5-lite — 2026-04-15
- 0.120.4-lite — 2026-04-14
- 0.120.3-lite — 2026-03-02
- 0.120.2-lite — 2026-03-02
- 0.120.1-lite — 2026-03-02
- 0.120.0-lite — 2026-03-02
- 0.112.0 — 2026-01-23
- … 59 more at https://npm.io/package/mathlive-tera/versions

## README

## This is project forked from _[mathlive](https://github.com/arnog/mathlive)_ project

# What is change in this repo?

1. Ability to make **_macro_** like a digit. It can replace by placeholder `#@`</br>
   </br>
2. Fix bug: Frac line not expand to full width.
   </br>

- Comment the line `fracLine.width = Math.max(numerBox.width, denomBox.width);` in **_genfrac.ts_** file
- Comment the line `this.width = rows.reduce((acc, row) => Math.max(acc, row.width), 0)` in **_v-box.ts_** file

3. Remove soundsDirectory and fontsDirectory and Plonk sounds
4. Now marcos function can define a mapping value for arguments. It use to replace value of input args to new value to
   display in view.\
   _Example:_\
    ``` 
   mf.current!.macros = {
                ...mf.current!.macros,
                conversion: {
                    args: 1,
                    def: '\\mathbf{#1}',
                    isImplicitArg: true,
                    argsMapping: {
                       value: 'newValueToDisplay'  
                   }
                },
            };
   ```
5. Change scroll into caret behavior to "smooth". executeCommand "move" type now can auto scroll into caret.
6. Add scroll commands. using `executeCommand(['scroll', distance])` or `executeCommand(['scrollTo', {left: 10, behavior: 'smooth'}])`
7. Define more default macros for support Calce
8. Default mathfield focus function will run with preventFocus = true
Changed in mathfield-private.ts  
```
focus(options: FocusOptions | undefined = {preventScroll: true})
```
9. Add scrollIntoCaret option in InsertOptions. This make sure the caret is always visible in input view
npm


10. Add custom document event ```mathlive-update-separator``` to notify that MathfieldElement global separator changed.

    Example:
    ```bash
    document.addEventListener("mathlive-update-separator", (event) => {
      // handler
    })
    ```


11. Ignore import warming in nextjs project
    ```javascript
    /** @type {import('next').NextConfig} */
    const nextConfig = {
      webpack: config => {
      config.ignoreWarnings = [
      { module: /src\/app\/component\/MathLiveComponent\.tsx/ },
      ];
      
          return config;
      }
    };
    
    export default nextConfig;
```

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