Skip to content

Incorrect Latex parsing when subscript is on LHS #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
repalash opened this issue Apr 14, 2025 · 0 comments
Open

Incorrect Latex parsing when subscript is on LHS #239

repalash opened this issue Apr 14, 2025 · 0 comments

Comments

@repalash
Copy link

Description

If the subscript is on the left hand side of assignment, the output is incorrect

Steps to Reproduce

console.info(ce.parse("x_{y}\\coloneq z").json);
console.info(ce.parse("x\\coloneq z_{y}").json);

Actual Result

[
  "Assign", 
  "Subscript", 
  ["Function", "z", "x", "y"]
]
["Assign", "x", "z_y"]

Expected Result

["Assign", ["Subscript", "x", "y"], "z"]
["Assign", "x", ["Subscript", "z", "y"]]

Environment

Is this a regression: did it use to work in a previous version?

Tested on the website at https://cortexjs.io/compute-engine/demo/

When testing locally, I think that i got the result for 2nd correctly, but I am not sure which version that was as it was installed as a dependency of mathlive.

Compute Engine version If using the cortexjs.io site, the version is displayed
at the bottom of the page. If using the library, the version is available as
window[Symbol.for('io.cortexjs.compute-engine')].version in the browser or by importing
version from the library.

The website just shows {{SDK_VERSION}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant