在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):viktorstrate/algebra-latex开源软件地址(OpenSource Url):https://github.com/viktorstrate/algebra-latex开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):algebra-latexAn 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 Exampleconst 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 librariesSupported libraries
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) |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论