数学 置 标语言
![本页使用了标题或全文手工转换](https://upload.wikimedia.org/wikipedia/commons/thumb/c/cd/Zh_conversion_icon_m.svg/35px-Zh_conversion_icon_m.svg.png)
互联网 | application/mathml+xml、application/mathml-presentation+xml、application/mathml-content+xml、math/mml |
---|---|
开发 | |
标记语言 | |
扩展 | XML |
标准 | Mathematical Markup Language (MathML) Version 3.0 2nd Edition |
网站 | W3C MathML |
历史
[编辑]它是
结构和 语法
[编辑]MathML
MathML
Presentation MathML
[编辑]Presentation MathML 侧重于如m
开头。构建 Presentation MathML
记号
<mi>x</mi>
—— 标识符 <mo>+</mo>
——操作 符 <mn>2</mn>
——数字 <mtext>non zero</mtext>
——文 本
<mtext><b>non</b> zero</mtext>
这些
<mrow>
——水平 的 一 行 <msup>
、<munderover>
等 等 ——上 标,规定上下 操作 符 ,就像求 和 号 等 等 一 样<mfrac>
——分数 <msqrt>
和 <mroot>
——方 根 <mfenced>
——用 栅隔离开内容 ,例 如括 号
π
→
。⁢
- U+2061
函数 应用 - U+2062
不可 见乘号 - U+2063
不可 见分隔 符 - U+2064
不可 见加号
MathML
<mrow>
a ⁢ <msup>x 2</msup>
+ b ⁢ x
+ c
</mrow>
<mrow>
<mi>a</mi> <mo>⁢</mo> <msup><mi>x</mi><mn>2</mn></msup>
<mo>+</mo><mi>b</mi><mo>⁢</mo><mi>x</mi>
<mo>+</mo><mi>c</mi>
</mrow>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN"
"http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mi>a</mi>
<mo>⁢</mo>
<msup>
<mi>x</mi>
<mn>2</mn>
</msup>
<mo>+</mo>
<mi>b</mi>
<mo>⁢ </mo>
<mi>x</mi>
<mo>+</mo>
<mi>c</mi>
</mrow>
</math>
Content MathML
[编辑]Content MathML 侧重于表达式<apply>
<apply>
标识ci
cn
。times
、power
<apply><sin/><ci>x</ci></apply>
<apply><plus/><ci>x</ci><cn>5</cn></apply>
<apply>
<math>
<apply>
<plus/>
<apply>
<times/>
<ci>a</ci>
<apply>
<power/>
<ci>x</ci>
<cn>2</cn>
</apply>
</apply>
<apply>
<times/>
<ci>b</ci>
<ci>x</ci>
</apply>
<ci>c</ci>
</apply>
</math>
Content MathML <apply>...</apply>
(...)
,而且许多
(plus
(times a (power x 2))
(times b x)
c)
这
与 其它格式 的 对比
[编辑]x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
x={-b +- sqrt{b sup 2 – 4ac}} over 2a
x={-b plusminus sqrt {b^2 – 4 ac}} over {2 a} x={-b ± sqrt {b^2 – 4ac}} over 2a x={-b +- sqrt {b^2 – 4ac}} over 2a
x = (-b +- sqrt(b^2 – 4ac)) / (2a)
<math mode="display" xmlns="http://www.w3.org/1998/Math/MathML">
<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="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>
</math>
虽然如此,
在 XHTML或 HTML5文 件 中内 嵌 MathML
[编辑]MathML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Example of MathML embedded in an XHTML file</title>
<meta name="description" content="Example of MathML embedded in an XHTML file" />
<meta name="keywords" content="Example of MathML embedded in an XHTML file" />
</head>
<body>
<h1>Example of MathML embedded in an XHTML file</h1>
<p>
Given the quadratic equation
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mi>a</mi>
<mo>⁢<!-- ⁢ --></mo>
<msup>
<mi>x</mi>
<mn>2</mn>
</msup>
<mo>+</mo>
<mi>b</mi>
<mo>⁢<!-- ⁢ --></mo>
<mi>x</mi>
<mo>+</mo>
<mi>c</mi>
<mo>=</mo>
<mi>0</mi>
</mrow>
</math>
, the roots are given by
<math xmlns="http://www.w3.org/1998/Math/MathML">
<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>
</math>
.
</p>
</body>
</html>
![使用带有STIX Beta字体的火狐浏览器3.5版显示MathML的图片例子 (math-test.xhtml)](https://upload.wikimedia.org/wikipedia/commons/0/09/Math_test.png)
而内联MathML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example of MathML embedded in an HTML5 file</title>
</head>
<body>
<h1>Example of
<abbr title="Mathematical Markup Language">MathML</abbr>
embedded in an
<abbr title="HyperText Markup Language">HTML</abbr>
5 file
</h1>
<p>
Given the quadratic equation
<math>
<mrow>
<mi>a</mi>
<mo>⁢</mo>
<msup>
<mi>x</mi>
<mn>2</mn>
</msup>
<mo>+</mo>
<mi>b</mi>
<mo>⁢</mo>
<mi>x</mi>
<mo>+</mo>
<mi>c</mi>
<mo>=</mo>
<mi>0</mi>
</mrow>
</math>
, the roots are given by
<math>
<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>
</math>
.
</p>
</body>
</html>
软件支持
[编辑]浏览器
[编辑]而WebKit
Opera 9.5—12
Internet Explorer
编辑器
[编辑]MathML还得
Firemath
手写 识别
[编辑]Windows 7
参考 文献
[编辑]- ^ Calculadora Alicia. [2022-11-10]. (
原始 内容 存 档于2023-12-29). - ^ Steven DeRose. The SGML FAQ Book: Understanding the Relationship of SGML and XML, Kluwer Academic Publishers, 1997. ISBN 978-0-7923-9943-8.
- ^ Canonical S-expressions#cite note-0
- ^ Calculadora Alicia. [2022-11-10]. (
原始 内容 存 档于2023-12-29). - ^ Wang, Frédéric, Mozilla MathML Status, Mozilla, [2018-07-11], (
原始 内容 存 档于2013-04-09) - ^ Sidje, Roger B., Authoring MathML for Mozilla, Mozilla, [2018-07-11], (
原始 内容 存 档于2010-03-24) - ^ Bug 3251 – Implement MathML (master bug), WebKit, [2018-07-11], (
原始 内容 存 档于2018-07-11) . . . (However, "see also") https://trac.webkit.org/wiki/MathML%20Status (页面存 档备份,存 于互联网档案 馆) - ^ Safari 5.1 and math, [2018-07-11], (
原始 内容 存 档于2018-07-26) - ^ MathML Support Coming To Chrome, BrowserFame, [16 October 2012]
已 忽 略 未知 参 数 |archive- url=
(帮助) - ^ Stable Chrome 24 supports MathML and closes security holes, The H Online, [11 January 2013], (
原始 内容 存 档于2017-04-21) - ^ Stable Channel Update, [7 April 2013], (
原始 内容 存 档于2016-11-04) - ^ Google subtracts MathML from Chrome, and anger multiplies. CNET. [22 November 2014]. (
原始 内容 存 档于2018-07-11). - ^ Frédéric Wang. Funding MathML Developments in Gecko and WebKit - Blog de Frédéric. maths-informatique-jeux.com. [22 November 2014]. (
原始 内容 存 档于2014-12-14). - ^ McCathieNevile, Charles, Can Kestrels do Math? MathML support in Opera Kestrel, Opera, 27 September 2007 [2018-07-11], (
原始 内容 存 档于2012-03-12) - ^ Olsen, Tommy A., Even more work, Opera, 16 November 2007, (
原始 内容 存 档于18 November 2007) - ^ MathML – The Opera MathML blog. My.opera.com (1 November 2007). Retrieved on 9 May 2012.
- ^ UserJS for MathML 2.0. My.opera.com. Retrieved on 9 May 2012.
- ^ Opera 14 beta for Android is out, (
原始 内容 存 档于2013-03-08) - ^ MathPlayer – version history, [2018-07-11], (
原始 内容 存 档于2018-07-11) - ^ Microsoft cripples the display of math in IE10 & 11. dessci.com. [22 November 2014]. (
原始 内容 存 档于2014年 7月 1日 ). - ^ Bug 30526 – MathML support for Konqi, [2018-07-11], (
原始 内容 存 档于2018-06-10)
外部 链接
[编辑]- W3C MathML (页面
存 档备份,存 于互联网档案 馆) (英文 ) - MathPlayer (页面
存 档备份,存 于互联网档案 馆) (英文 ) -Internet Explorer的 插件。 - MathML in Mozilla (页面
存 档备份,存 于互联网档案 馆) (英文 ) -Mozilla的 MathML计划。 - WYSIWYG Equation editor (页面
存 档备份,存 于互联网档案 馆) (英文 ) - Pavi, Sandhu. The Mathml Handbook. Charles River Media. December 12, 2002 [2015-11-05]. (
原始 内容 存 档于2015-11-07).
参 见
[编辑]
|
|
|