Menu

#4683 lurkmathml does not typeset z[2]^3 correctly

None
open
mathml (6)
5
2026-03-17
2026-03-17
Leo Butler
No
mathml(z[2]^3);

produces an output that is rendered as z^3(2).

 <math xmlns="http://www.w3.org/1998/Math/MathML"> <msup><mrow><mi>z</mi> </mrow> 
 <mn>3</mn> </msup> <mrow><mo>(</mo><mn>2</mn> <mo>)</mo></mrow> </math>

A similar problem is faced by the tex code and is solved with this test:

(not (member 'array (cdar fx) :test #'eq)) ; fix for x[i]^2

Adding this test to mathml-mexpt results in the correct typesetting of z[2]^3.

Discussion

  • Raymond Toy

    Raymond Toy - 2026-03-17

    What's the problem with the tex code? For tex(x[i]^2), I get $$x_{i}^2$$. I think that's right.

     
  • Leo Butler

    Leo Butler - 2026-03-17

    There is no problem with the tex here. As I say, adding that test from the tex code to the mathml code fixes the current issue.

     
    • Raymond Toy

      Raymond Toy - 2026-03-17

      Sorry. I misunderstood your comment. My fault!

       

Log in to post a comment.

MongoDB Logo MongoDB