({{, (RefLink[MathMLForm, paclet:ref/MathMLForm])[expr]
prints as a MathML form of expr. }})

OpenersNotesSection(Spacer1)Details

(RefLink[MathMLForm, paclet:ref/MathMLForm]) gives presentation MathML, although its output can normally be interpreted by the Wolfram Language.

(RefLink[MathMLForm, paclet:ref/MathMLForm])[expr] gives MathML for the (RefLink[TraditionalForm, paclet:ref/TraditionalForm]) of expr. »

(RefLink[MathMLForm, paclet:ref/MathMLForm])[(RefLink[StandardForm, paclet:ref/StandardForm])[expr]] gives MathML for the (RefLink[StandardForm, paclet:ref/StandardForm]) of expr. »

(RefLink[MathMLForm, paclet:ref/MathMLForm]) acts as a "wrapper", which affects printing, but not evaluation.

(RefLink[MathMLForm, paclet:ref/MathMLForm]) gives special characters using HTML aliases.

OpenersPrimaryExamplesSection(Spacer1)Examples  (14)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

A typeset expression:

MathMLForm[x+(y^2)]

A special character:

MathMLForm[α]

OpenersExampleSection1(Spacer1)Scope  (7)

Subscripts and superscripts:

Table[Panel[MathMLForm[f]],{f,{(Subscript[x, a]),(x^a),(Subscript[x, a]^b)}}]

Overscripts and underscripts:

Table[Panel[MathMLForm[f]],{f,{(Overscript[x, a]),(Underscript[x, a])}}]

List structures:

MathMLForm[{a,b,{c}}]

A matrix:

Short[MathMLForm[(({{a, b, c}, {d, e, f}}))],4]

Logic operations:

MathMLForm[x∧y]

A definite sum:

MathMLForm[Sum[x^x,{x,1,y}]]

A special function:

MathMLForm[Beta[z,a,b]]

OpenersExampleSection2(Spacer1)Generalizations & Extensions  (1)

(RefLink[MathMLForm, paclet:ref/MathMLForm]) gives MathML for the (RefLink[TraditionalForm, paclet:ref/TraditionalForm]) expression:

MathMLForm[Sin[x]]

Obtain MathML for the expression in (RefLink[StandardForm, paclet:ref/StandardForm]):

MathMLForm[StandardForm[Sin[x]]]

OpenersExampleSection3(Spacer1)Properties & Relations  (4)

Convert an expression to MathML:

ml=MathMLForm[x+Exp[y]]

Use (RefLink[ToExpression, paclet:ref/ToExpression]) to convert MathML back to Wolfram Language syntax:

ToExpression[ToString[ml],MathMLForm]

Use (RefLink[ToExpression, paclet:ref/ToExpression]) to convert from any MathML to the Wolfram Language:

ToExpression["<math><msup><mi>x</mi><mi>y</mi></msup></math>", MathMLForm]

Use (RefLink[Export, paclet:ref/Export]) to generate a MathML document, including semantic markup:

ExportString[Sin[x],"MathML"]

Add formatting via (RefLink[Format, paclet:ref/Format]):

bin[x,y]//MathMLForm

Format[bin[x_,y_],MathMLForm]:=MatrixForm[{{x},{y}}]

bin[x,y]//MathMLForm

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Export, paclet:ref/Export])  ▪  (RefLink[TeXForm, paclet:ref/TeXForm])  ▪  (RefLink[Import, paclet:ref/Import])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Exchanging Material with the Web, paclet:tutorial/ExchangingMaterialWithTheWeb])}, {▪(RefLinkPlain[Forms of Input and Output, paclet:tutorial/FormsOfInputAndOutput])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Mathematical Typesetting, paclet:guide/MathematicalTypesetting])}})}})