compute-engine icon indicating copy to clipboard operation
compute-engine copied to clipboard

MathJSON from Integral with `\limits`

Open kungfooman opened this issue 1 year ago • 0 comments

Example TeX producing wrong output:

\int\limits_{-1}^{1}{\frac{1}{\sqrt{1-x^2}}\,{\mathrm{d}}x

Wrong output:

[
  "Sequence",
  ["Integrate", "Nothing", "Nothing"],
  [
    "Error",
    ["ErrorCode", "'unexpected-command'", "'\\limits'"],
    ["LatexString", "'\\limits'"]
  ]
]

This integral, which is basically the same without using \limits_ works however:

\int_{-1}^{1}\!{\frac{1}{\sqrt{1-x^2}}\,\mathrm{d}x

Output:

[
  "Integrate",
  ["Divide", 1, ["Sqrt", ["Subtract", 1, ["Square", "x"]]]],
  ["Triple", "x", -1, 1]
]

kungfooman avatar Mar 14 '24 15:03 kungfooman