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.
What's the problem with the
texcode? Fortex(x[i]^2), I get$$x_{i}^2$$. I think that's right.There is no problem with the
texhere. As I say, adding that test from thetexcode to themathmlcode fixes the current issue.Sorry. I misunderstood your comment. My fault!