# inequality

> A symbolic equation editor for the web

Latest version **1.2.8** (published 2026-07-13) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install inequality
pnpm add inequality
yarn add inequality
bun add inequality
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.2.8 |
| Published | 2026-07-13 |
| First published | 2019-04-12 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 709.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Andrea Franceschini |
| Maintainers | j.sharkey13, mwtrew, jacbn, sjd210 |

## Links

- npm: https://www.npmjs.com/package/inequality
- Repository: https://github.com/isaacphysics/inequality
- Homepage: https://github.com/isaacphysics/inequality#readme
- Issues: https://github.com/isaacphysics/inequality/issues
- npm.io page: https://npm.io/package/inequality

## Recent versions

- 1.2.8 (latest) — 2026-07-13
- 1.2.7 — 2026-05-18
- 1.2.6 — 2026-01-27
- 1.2.5 — 2025-10-30
- 1.2.4 — 2025-08-26
- 1.2.3 — 2025-02-04
- 1.2.2 — 2025-01-21
- 1.2.1 — 2025-01-15
- 1.2.0 — 2024-12-20
- 1.1.5 — 2024-12-09
- 1.1.4 — 2024-11-04
- 1.1.3 — 2024-10-10
- 1.1.2 — 2024-09-13
- 1.1.1 — 2024-09-09
- 1.1.0 — 2023-01-18
- … 40 more at https://npm.io/package/inequality/versions

## README

# Inequality

Multi-modal equation entry on the web.

Inequality is the drag-and-drop, symbolic entry system developed for [Isaac Physics](https://isaacphysics.org) for users to enter symbolic maths (and chemistry, and boolean logic) in a way familiar to a high school student who does not know any other specialist syntax.

A [demo](https://isaacphysics.org/equality) is available -- and yes, we are aware of the naming irony here, that's what happens when you rewrite a legacy project.

For information on how to integrate Inequality into your project, please see https://github.com/isaacphysics/isaac-react-app/blob/master/src/app/components/pages/Equality.tsx

## Documentation

Please see [DOCS.md](DOCS.md) and inline code comments.

## Usage

> npm i --save inequality

or

> yarn add inequality

```javascript
import { makeInequality } from 'inequality';

let eqnEditorElement = document.querySelector('.equation-editor')[0];

let { sketch, p } = makeInequality(
    eqnEditorElement,
    eqnEditorElement.width(),
    eqnEditorElement.height(),
    [], // place your initial symbols here
    {
        fontItalicPath: 'assets/STIXGeneral-Italic.ttf', // Yes, this is a little awkward but p5 wants to load fonts from paths...
        fontRegularPath: 'assets/STIXGeneral-Regular.ttf',
    }
);
sketch.log = { initialState: [], actions: [] };
sketch.onNewEditorState = (s) => { /* Do something with the new state */ };
sketch.onCloseMenus = () => { /* You can use this to close menus if you have hiding menus */ };
sketch.isUserPrivileged = () => { /* Just return true here :) */ };
sketch.onNotifySymbolDrag = (x, y) => { /* This is useful with external menus */ };
sketch.isTrashActive = () => { /* This is useful when some menu elements or buttons are DOM elements */ };
```

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