2.0.3 • Published 3 years ago

algebra-latex v2.0.3

Weekly downloads
46
License
MIT
Repository
github
Last release
3 years ago

algebra-latex

Build Status npm version

An npm module, with no dependencies, for parsing LaTeX math to a regular math string (ascii math), that can be parsed to other algebra or math libraries like algebrite and algebra.js

Example

const AlgebraLatex = require('algebra-latex')

// Parse from LaTeX ...
const latexInput = '\\frac{1}{\\sqrt{2}}\\cdot x=10'
const algebraObj = new AlgebraLatex().parseLatex(latexInput)

// ... or parse from regular math string
const mathInput = '1/sqrt(2)*x=10'
const algebraObj = new AlgebraLatex().parseMath(mathInput)

console.log(algebraObj.toMath()) // output: 1/sqrt(2)*x=10
console.log(algebraObj.toLatex()) // output: \frac{1}{\sqrt{2}}\cdot x=10

Parse to other libraries

Supported libraries

NOTE: The above libraries are optional, and have to be installed before use

continuing from example above

...

var algebraJS = require('algebra.js')
var algebrite = require('algebrite')
var coffeequate = require('coffeequate')

// For algebra.js
algebraObj.toAlgebra(algebraJS) // Will either return an algebra.js expression or equation

// For algebrite
algebraObject.toAlgebrite(algebrite)

// For coffequate
algebraObject.toCoffeequate(coffeequate)
2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.5.3

6 years ago

0.5.2

6 years ago

0.5.1

6 years ago

0.5.0

7 years ago

0.4.5

7 years ago

0.4.4

7 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.7

7 years ago

0.3.6

7 years ago

0.3.5

7 years ago

0.3.4

7 years ago

0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.2

7 years ago