Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asnunes/mathml2asciimath
A javascript tool to convert mathml syntax to asciimath
https://github.com/asnunes/mathml2asciimath
Last synced: 18 days ago
JSON representation
A javascript tool to convert mathml syntax to asciimath
- Host: GitHub
- URL: https://github.com/asnunes/mathml2asciimath
- Owner: asnunes
- License: mit
- Created: 2020-01-03T09:46:51.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T05:22:49.000Z (about 2 years ago)
- Last Synced: 2024-12-02T23:35:15.965Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 970 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mathml2asciimath
[![npm version](https://badge.fury.io/js/mathml2asciimath.svg)](https://badge.fury.io/js/mathml2asciimath)
It converts [MathML](https://en.wikipedia.org/wiki/MathML) to [ASCIIMath](http://asciimath.org/).
Please notice that ASCIIMath represents only a subset of MathML context, therefore some information may be lost in the process. In general, if it can be represented in ASCIIMath, it will be well converted.
## Instalation
If you use NPM
````
npm install mathml2asciimath --save
````If you use Yarn
````
yarn add mathml2asciimath
````## Usage
````javascript
const Mathml2asciimath = require('mathml2asciimath');const mathml = `
a
+
b
`;new Mathml2asciimath(mathml).convert();
// => a + b
`````````javascript
const Mathml2asciimath = require('mathml2asciimath');const mathml = `
A
=
x
y
z
w
`;new Mathml2asciimath(mathml).convert();
// => A = [(x, y), (z, w)]
`````Please read ```index.test.js``` file for more use cases.