Skip to content

LaTeX parsing: Discrepency with processing "GCD" vs "LCM" #257

@tejashah88

Description

@tejashah88

Making a new issue here since it seems to be more relevant (from arnog/mathlive#2858).

Description

I was testing GCD and LCM on the Mathfield demo website and noticed the following behaviour:

Keyboard Input LaTeX MathJSON
lcm(24,37) \operatorname{lcm}\left(24,37\right) ["LCM", 24, 37]
\operatorname{lcm}\left(24,37\right) \operatorname{lcm}\left(24,37\right) ["LCM", 24, 37]
gcd(24,37) \gcd\left(24,37\right) ["Tuple", "GCD", ["Tuple", 24, 37]]
\operatorname{gcd}(24,37) \operatorname{gcd}(24,37) ["GCD", 24, 37]

It seems that the LaTeX \gcd function is causing extraneous tuples to be generated.

Steps to Reproduce

For each row, type according to Keyboard Input. Copy-pasting won't work unless you do it with the LaTeX column. The LaTeX and MathJSON should appear accordingly.

Environment

The keyboard input is tested against the mathlive.io demo website: https://mathlive.io/mathfield/demo/ using compute engine v0.30.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions