cortex-js / compute-engine

An engine for symbolic manipulation and numeric evaluation of math formulas expressed with MathJSON
https://cortexjs.io
MIT License
356 stars 42 forks source link

Canonical order with frac #141

Closed remiangot closed 7 months ago

remiangot commented 7 months ago

Description

3/2 => 2/3 with canonical order

Steps to Reproduce

const expr = '\\frac{3}{2}'
const parsedExpr = ce.parse(expr, { canonical: ['Order'] })
console.log(parsedExpr.latex.toString())

Actual Behavior

It returns \frac{2}{3}

Expected Behavior

It should return \frac{3}{2}

Environment

ComputeEngine 0.23.0 Operating System macOS Browser Safari, Chrome...