1

It seems that only things like ToExpression["1+1"] can be evaluated without error in Mathematica Online. Converting TeXForm, TraditionalForm, and RowBox always gives error with result returns:

FrontEndObject::notavail: A front end is not available; certain operations require a front end and sometimes crashes the kernel.

But when converting MathMLForm, any expression (that can be executed on my laptop) would return $Failed. I thought ImportString could also parse MathML, so I tried

CellPrint[
Cell[BoxData[
ImportString["<math><msup><mi>x</mi><mn>2</mn></msup></math>", 
"MathML"]], "Output"]]

Sadly it returns red error message(which should be part of the evaluated code)

BoxData[FormBox[TagBox[x,MathMLPresentationTag,AutoDeleteTrue],TraditionalForm]]

Is there any workaround to parse MathML on Mathematica Online?

vapor
  • 7,911
  • 2
  • 22
  • 55
  • ToExpression@ ImportString["<math><msup><mi>x</mi><mn>2</mn></msup></math>", "MathML"] works for this simple case. But in general, I had the impression that when pasting MathML, it is often needed to fix up the result before it can be interpreted ... – Szabolcs Jul 20 '15 at 08:37
  • @Szabolcs Thank you for your advice. In my mma online, all these commands worked, but when using CloudEvaluate, none of these worked. I also see some other person's using mma online and have none of these worked. – vapor Jul 20 '15 at 09:17
  • 2
    ToExpression["<math><msup><mi>x</mi><mn>2</mn></msup></math>", MathMLForm] works in Mathematica. This would seem to be a limitation or bug with the implementation of Mathematica Online. I would suggest contacting tech. support. – Michael E2 Aug 12 '15 at 10:31

0 Answers0