Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
MathML
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Example == The well-known [[quadratic formula]] could be represented in Presentation MathML as an expression tree made up from layout elements like {{code|lang=XML|<mfrac>}} or {{code|lang=XML|<msqrt>}}: <syntaxhighlight lang="xml"> <math mode="display" xmlns="http://www.w3.org/1998/Math/MathML"> <semantics> <mrow> <mi>x</mi> <mo>=</mo> <mfrac> <mrow> <mo form="prefix">−</mo> <mi>b</mi> <mo>±</mo> <msqrt> <msup><mi>b</mi><mn>2</mn></msup> <mo>−</mo> <mn>4</mn><mo>⁢</mo><mi>a</mi><mo>⁢</mo><mi>c</mi> </msqrt> </mrow> <mrow> <mn>2</mn> <mo>⁢</mo> <mi>a</mi> </mrow> </mfrac> </mrow> <annotation encoding="application/x-tex"><!-- TeX --> x = \frac{-b\pm\sqrt{b^2-4ac}}{2a} </annotation> <annotation encoding="StarMath 5.0"> x = {-b plusminus sqrt {b^2 - 4 ac}} over {2 a} </annotation> <!-- More annotations can be written: application/x-troff-eqn for eqn, application/x-asciimath for AsciiMath... --> <!-- Semantic MathML go under <annotation-xml encoding="MathML-Content">. --> </semantics> </math> </syntaxhighlight> This example uses the {{code|lang=XML|<annotation>}} element, which can be used to embed a semantic annotation in non-XML format, for example to store the formula in the format used by an equation editor such as [[StarMath]] or the markup using [[LaTeX]] syntax. The {{code|encoding}} field is usually a [[MIME type]], although most of the equation encodings don't have such a registration; freeform text may be used in such cases. Although less compact than other formats, the XML structuring of MathML makes its content widely usable and accessible, allows near-instant display in applications such as [[web browser]]s, and facilitates an interpretation of its meaning in mathematical software products. MathML is not intended to be written or edited directly by humans.<ref>{{cite web | url = https://www.w3.org/TR/REC-MathML/#abstract | title = Mathematical Markup Language (MathML) 1.01 Specification (Abstract) | access-date = 2006-09-26 | first1 = Steven | last1 = Buswell | first2 = Stan | last2 = Devitt | first3 = Angel | last3 = Diaz | display-authors = etal | date = 1999-07-07 | quote = While MathML is human-readable it is anticipated that, in all but the simplest cases, authors will use equation editors, conversion programs, and other specialized software tools to generate MathML. }}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)