viktorstrate / algebra-latex

Parse and calculate latex formatted math
https://www.npmjs.com/package/algebra-latex
MIT License
28 stars 9 forks source link

new AlgebraLatex().parseLatex(string) throws error when parsing cubic root of x #7

Closed mouessam closed 5 years ago

mouessam commented 5 years ago
const AlgebraLatex = require('algebra-latex');
const latexInput = '\\sqrt[3]{x}';
const algebraObj = new AlgebraLatex().parseLatex(latexInput);

it produces error

Error: Lexer error
\sqrt[3]{x}
    ^
Error at line: 1 col: 5
Unknown symbol: [
viktorstrate commented 5 years ago

Thank you for posting. Non-square roots might not be implemented yet. I will look into that 👍