From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/mathml/element/index.html | 234 ++++++++++++++++ files/zh-cn/web/mathml/element/maction/index.html | 235 ++++++++++++++++ files/zh-cn/web/mathml/element/math/index.html | 312 ++++++++++++++++++++++ files/zh-cn/web/mathml/element/mroot/index.html | 170 ++++++++++++ files/zh-cn/web/mathml/element/mrow/index.html | 95 +++++++ files/zh-cn/web/mathml/element/mspace/index.html | 163 +++++++++++ files/zh-cn/web/mathml/element/msqrt/index.html | 169 ++++++++++++ files/zh-cn/web/mathml/element/msub/index.html | 197 ++++++++++++++ files/zh-cn/web/mathml/element/msubsup/index.html | 87 ++++++ files/zh-cn/web/mathml/element/msup/index.html | 90 +++++++ 10 files changed, 1752 insertions(+) create mode 100644 files/zh-cn/web/mathml/element/index.html create mode 100644 files/zh-cn/web/mathml/element/maction/index.html create mode 100644 files/zh-cn/web/mathml/element/math/index.html create mode 100644 files/zh-cn/web/mathml/element/mroot/index.html create mode 100644 files/zh-cn/web/mathml/element/mrow/index.html create mode 100644 files/zh-cn/web/mathml/element/mspace/index.html create mode 100644 files/zh-cn/web/mathml/element/msqrt/index.html create mode 100644 files/zh-cn/web/mathml/element/msub/index.html create mode 100644 files/zh-cn/web/mathml/element/msubsup/index.html create mode 100644 files/zh-cn/web/mathml/element/msup/index.html (limited to 'files/zh-cn/web/mathml/element') diff --git a/files/zh-cn/web/mathml/element/index.html b/files/zh-cn/web/mathml/element/index.html new file mode 100644 index 0000000000..6eabd340c7 --- /dev/null +++ b/files/zh-cn/web/mathml/element/index.html @@ -0,0 +1,234 @@ +--- +title: MathML 元素参考 +slug: Web/MathML/Element +tags: + - MathML + - MathML 参考 +translation_of: Web/MathML/Element +--- +

{{MathMLRef}}

+ +

这是一份按字母排序的 MathML 呈现型元素列表。

+ +

呈现型标记presentation markup)相关条目被用来描述数学记号的布局结构,而内容型标记content markup)则用于提供潜在的数学含义,MathML 解析器不支持渲染内容型标记(见 {{bug(276028)}})。若想了解更多关于内容型标记的信息,可以考虑阅读 MathML 3 规范第四章

+ +

MathML 元素实现了 {{domxref("MathMLElement")}} 类。

+ +

MathML 呈现型元素(字母排序)

+ +
+

math

+ + + +

A

+ + + +

E

+ + + +

F

+ + + +

G

+ + + +

I

+ + + +

L

+ + + +

M

+ + + +

N

+ + + +

O

+ + + +

P

+ + + +

R

+ + + +

S

+ + + +

T

+ + + +

U

+ + + +

其他元素

+ + +
+ +

MathML 呈现型元素(类别分类)

+ +

顶层元素

+ + + +

字符/符号元素

+ + + +

通用布局元素

+ + + +

边标和角标元素

+ + + +

表格数学

+ + + +

初等数学

+ + + +

尚无分类的元素

+ + + +

语义附注元素

+ + + +

请参阅

+ + diff --git a/files/zh-cn/web/mathml/element/maction/index.html b/files/zh-cn/web/mathml/element/maction/index.html new file mode 100644 index 0000000000..3715f500ec --- /dev/null +++ b/files/zh-cn/web/mathml/element/maction/index.html @@ -0,0 +1,235 @@ +--- +title: +slug: Web/MathML/Element/maction +translation_of: Web/MathML/Element/maction +--- +
{{MathMLRef}}
+ +
+

MathML<maction>元素提供了一种让表达式(或子表达式)具有某种特定行为的可能性。具体行为方式由actiontype属性的取值来确定。也可以使用selection属性来手动指定该行为作用在哪个子元素上。

+
+ +

属性

+ +
+
actiontype
+
该属性描述元素上发生了哪种行为,有如下几种取值: +
    +
  • statusline: 当元素被点击或屏幕阅读器的指针指向该元素时触发,message会在浏览器的状态栏中显示。语法如下:<maction actiontype="statusline"> expression message </maction>
  • +
  • toggle: 当子表达式被点击时触发,子表达式会依次显示。因此每次点击时selection的值都会增加。语法如下:<maction actiontype="toggle" selection="positive-integer" > expression1 expression2 expressionN </maction>
  • +
  • tooltip: 当指针指向表达式时触发,会在表达式附近显示一个提示框。语法如下:<maction actiontype="tooltip"> expression message </maction>
  • +
+
+
class, id, style
+
样式表使用。
+
href
+
用来设置标签点击后跳转的链接。
+
mathbackground
+
用来设置标签的背景色,可以使用#rgb#rrggbb或者HTML颜色名
+
mathcolor
+
用来设置文字和分数的线的颜色,同样可以使用#rgb#rrggbb或者HTML颜色名
+
selection
+
用来设置该行为作用在哪个子元素上,默认为1,代表第一个子元素。
+
+ +

例子

+ +

下面的例子演示了如何使用“toggle”这个actiontype

+ +
<math>
+
+<maction actiontype="toggle">
+
+  <mfrac>
+    <mn>6</mn>
+    <mn>8</mn>
+  </mfrac>
+
+  <mfrac>
+    <mrow>
+      <mn>3</mn>
+      <mo>&sdot;</mo>
+      <mn>2</mn>
+    </mrow>
+    <mrow>
+      <mn>4</mn>
+      <mo>&sdot;</mo>
+      <mn>2</mn>
+    </mrow>
+  </mfrac>
+
+  <mfrac>
+    <mn>3</mn>
+    <mn>4</mn>
+  </mfrac>
+
+</maction>
+
+</math>
+
+ +

规范

+ + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{ SpecName('MathML3', 'chapter3.html#presm.maction', 'maction') }}{{ Spec2('MathML3') }}Current specification
{{ SpecName('MathML2', 'chapter3.html#presm.maction', 'maction') }}{{ Spec2('MathML2') }}Initial specification
+ +

浏览器兼容性

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatNo}}{{ CompatGeckoDesktop("1.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}} [2]
actiontype{{CompatNo}}{{CompatVersionUnknown}} [1]{{CompatNo}}{{CompatNo}}{{CompatVersionUnknown}} [4]
href{{CompatNo}}{{ CompatGeckoDesktop("7.0") }}{{CompatNo}}{{CompatNo}}10.0 {{webkitbug(85733)}} [3]
mathbackground{{CompatNo}}{{ CompatGeckoDesktop("2.0") }}{{CompatNo}}{{CompatNo}}5.1
mathcolor{{CompatNo}}{{ CompatGeckoDesktop("2.0") }}{{CompatNo}}{{CompatNo}}5.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("1.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
actiontype{{CompatNo}}{{CompatNo}}{{CompatVersionUnknown}} [1]{{CompatNo}}{{CompatNo}}{{CompatNo}}
href{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("7.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
mathbackground{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("2.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
mathcolor{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("2.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

[1] 只包括 toggle 和 statusline, tooltip 暂未实现。参考 bug 544001.

+ +

[2] 参考 WebKit bug 85734.

+ +

[3] 参考 WebKit bug 85733.

+ +

[4] 只包括toggle, statusline 和 tooltip 暂未实现 。参考WebKit bug 120059.

+ +

Gecko具体说明

+ + diff --git a/files/zh-cn/web/mathml/element/math/index.html b/files/zh-cn/web/mathml/element/math/index.html new file mode 100644 index 0000000000..dcbef71b23 --- /dev/null +++ b/files/zh-cn/web/mathml/element/math/index.html @@ -0,0 +1,312 @@ +--- +title: +slug: Web/MathML/Element/math +tags: + - MathML + - MathML Reference + - 'MathML:Element' +translation_of: Web/MathML/Element/math +--- +
{{MathMLRef}}
+ +

MathML的顶级元素是<math>。所有有效的MathML实例必须被包括在 <math> 标记中。另外不可以在一个 <math> 元素中嵌套第二个 <math> 元素,但是 <math> 元素中可以有任意多的子元素 。

+ +

属性

+ +

除了以下提到的属性, <math> 元素接受所有 {{ MathMLElement("mstyle") }} 元素的属性。

+ +
+
class, id, style
+
用于配合样式表使用。
+
dir
+
公式的整体方向。取值可以是 ltr (从左到右) 或者 rtl (从右到左).
+
href
+
用于给公式设置一个超链接的URI。
+
mathbackground
+
背景颜色。你可以使用#rgb格式、 #rrggbb 格式和 HTML颜色名
+
mathcolor
+
公式的文本颜色。你可以使用#rgb格式、 #rrggbb 格式和 HTML颜色名
+
display
+
这个枚举属性指定本标记所括的MathML代码应该如何被显示。该属性有如下取值: +
    +
  • block, 使用该值会使该MathML元素显示于文本之外,成为一个独立的块元素,不受其所在的文本的影响。
  • +
  • inline, 使用该值使这段MathML显示为行内元素,放置于当前文本的区域中。除非改变文本的显示,否则无法移动这个MathML的显示位置。
  • +
+ +

如果没有指定该属性值,默认值采用 inline

+
+
mod {{deprecated_inline}}
+
因为display属性的出现而废弃。
+ 可用取值为:display (效果和display="block"一样) 和and inline.
+
overflow
+
指定当该数学公式超过了其运行的范围时应该如何表现。
+ 可能的取值为: linebreak (默认值), scroll, elide, truncate, scale.
+
+ +

范例

+ +

Theorem of Pythagoras

+ +

HTML5 记号

+ +
<!DOCTYPE html>
+<html>
+  <head>
+    <title>MathML in HTML5</title>
+  </head>
+  <body>
+
+  <math>
+    <mrow>
+      <mrow>
+        <msup>
+          <mi>a</mi>
+          <mn>2</mn>
+        </msup>
+        <mo>+</mo>
+        <msup>
+          <mi>b</mi>
+          <mn>2</mn>
+        </msup>
+      </mrow>
+      <mo>=</mo>
+      <msup>
+        <mi>c</mi>
+        <mn>2</mn>
+      </msup>
+    </mrow>
+  </math>
+
+  </body>
+</html>
+
+ +

XHTML 记号

+ +
<?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">
+<head>
+ <title>MathML in XHTML</title>
+</head>
+<body>
+
+  <math xmlns="http://www.w3.org/1998/Math/MathML">
+    <mrow>
+      <mrow>
+        <msup>
+          <mi>a</mi>
+          <mn>2</mn>
+        </msup>
+        <mo>+</mo>
+        <msup>
+          <mi>b</mi>
+          <mn>2</mn>
+        </msup>
+      </mrow>
+      <mo>=</mo>
+      <msup>
+        <mi>c</mi>
+        <mn>2</mn>
+      </msup>
+    </mrow>
+  </math>
+
+</body>
+</html>
+ +

注意: XHTML 文档如果带有MathML,必须将文档的MIME类型设置为application/xhtml+xml进行发送。一般来说可以通过将扩展名改为.xhtml 来实现对本地文件的修改。对于Apache服务器,你可以配置.htaccess文件 来达到映射扩展名为正确的MIME类型的目的。因为MathML被放在一个XML文件中,你必须编写一个严格符合XML格式的文档。

+ +

规范

+ + + + + + + + + + + + + + + + + + + + + +
规范状态注释
{{ SpecName('MathML3', 'chapter2.html#interf.toplevel', 'The Top-Level math Element') }}{{ Spec2('MathML3') }}当前的规范
{{ SpecName('MathML2', 'chapter7.html#interf.toplevel', 'The Top-Level math Element') }}{{ Spec2('MathML2') }}最初的规范
+ +

浏览器兼容性

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
XHTML标记{{CompatNo}}{{ CompatGeckoDesktop("1.0") }}{{CompatNo}}9.55.1
HTML5标记{{CompatNo}}{{ CompatGeckoDesktop("2.0") }}{{CompatNo}}{{CompatNo}}5.1
dir{{CompatNo}}{{ CompatGeckoDesktop("12.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
href{{CompatNo}}{{ CompatGeckoDesktop("7.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}} [1]
mathbackground{{CompatNo}}{{ CompatGeckoDesktop("2.0") }}{{CompatNo}}{{CompatNo}}5.1
mathcolor{{CompatNo}}{{ CompatGeckoDesktop("2.0") }}{{CompatNo}}{{CompatNo}}5.1
overflow{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
XHTML 标记{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("1.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
HTML5 标记{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("2.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
dir{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("12.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
href{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("7.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}} [1]
mathbackground{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("2.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
mathcolor{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("2.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
overflow{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

[1] See bug 85733.

+ +

Gecko-specific 注释

+ +

Gecko 7.0 {{ geckoRelease("7.0") }} 添加了对所有MathML属性在顶级math元素上的支持。 (也就是说和添加一个{{ MathMLElement("mstyle") }}元素效果一样)。然而,displaystyle 属性直到Gecko 8.0 {{ geckoRelease("8.0") }} 才 被添加进实现

+ +

纯文本的fall-back (alttext) 或者指定替代图像的属性altimg, altimg-width, altimg-heightaltimg-valign 目前都还没有在Gecko中实现。

+ +

另见

+ + diff --git a/files/zh-cn/web/mathml/element/mroot/index.html b/files/zh-cn/web/mathml/element/mroot/index.html new file mode 100644 index 0000000000..1df10ea315 --- /dev/null +++ b/files/zh-cn/web/mathml/element/mroot/index.html @@ -0,0 +1,170 @@ +--- +title: +slug: Web/MathML/Element/mroot +translation_of: Web/MathML/Element/mroot +--- +
{{MathMLRef}}
+ +

MathML的<mroot>元素用来表示一个有明确根指数的根式。它接受两个参数,语法如下:<mroot> base index </mroot>

+ +

属性

+ +
+
class, id, style
+
样式表使用。
+
href
+
用来设置标签点击后跳转的链接。
+
mathbackground
+
用来设置标签的背景色,可以使用#rgb#rrggbb或者HTML颜色名
+
mathcolor
+
用来设置文字(包括根底数、根指数和根号本身)的颜色,同样可以使用#rgb#rrggbb或者HTML颜色名
+
+ +

例子

+ +

下述代码表示:x

+ +

您的浏览器的渲染结果:x 3

+ +
<math>
+
+ <mroot>
+    <mi>x</mi>
+    <mn>3</mn>
+ </mroot>
+
+</math>
+
+ +

规范

+ + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{ SpecName('MathML3', 'chapter3.html#presm.mroot', 'mroot') }}{{ Spec2('MathML3') }}Current specification
{{ SpecName('MathML2', 'chapter3.html#presm.mroot', 'mroot') }}{{ Spec2('MathML2') }}Initial specification
+ +

浏览器兼容性

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatNo}}{{ CompatGeckoDesktop("1.0") }}{{CompatNo}}{{CompatNo}}5.1
href{{CompatNo}}{{ CompatGeckoDesktop("7.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
mathbackground{{CompatNo}}{{ CompatGeckoDesktop("2.0") }}{{CompatNo}}{{CompatNo}}5.1
mathcolor{{CompatNo}}{{ CompatGeckoDesktop("2.0") }}{{CompatNo}}{{CompatNo}}5.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("1.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
href{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("7.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
mathbackground{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("2.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
mathcolor{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("2.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

相关链接

+ +
    +
  • {{ MathMLElement("msqrt") }} (Square root without an index)
  • +
diff --git a/files/zh-cn/web/mathml/element/mrow/index.html b/files/zh-cn/web/mathml/element/mrow/index.html new file mode 100644 index 0000000000..b735b70dd6 --- /dev/null +++ b/files/zh-cn/web/mathml/element/mrow/index.html @@ -0,0 +1,95 @@ +--- +title: +slug: Web/MathML/Element/mrow +tags: + - MathML + - MathML 元素 + - MathML 参考 + - MathML 布局 +translation_of: Web/MathML/Element/mrow +--- +
{{MathMLRef}}
+ +

MathML <mrow> 元素用于对连续多行表达式的不同子表达式进行分组,一条子表达式通常算作一行,至少包含一或多个操作符与其运算对象(比如 {{ MathMLElement("mi") }} 和 {{ MathMLElement("mn") }})。此元素呈现为包含其内容的水平行。

+ +

在编写 MathML 表达式时,您应该使用 <mrow> 将表达式中的元素分组,就像它们在数学解释时的分成一行行一样。正确的分组有助于表达式的呈现,具体体现在以下几个方面:

+ +
    +
  • 如果有需要,它会改变间距来改善显示效果。
  • +
  • 它允许采用更明智的断行和缩进算法。
  • +
  • 通过自动化系统,如计算机代数系统和音频渲染器(automated systems such as computer algebra systems and audio renderers),它能简化表达式的解释(interpretation)过程。
  • +
+ +

属性

+ +
+
class, id, style
+
用来供样式表使用。
+
dir
+
行内公式的书写方向。可能的值为 ltr(自左向右)或 rtl(自右向左)。
+
href
+
用于设置一个指向指定的 URI 的超链接。
+
mathbackground
+
背景色。支持 #rgb#rrggbbHTML 颜色
+
mathcolor
+
文本颜色。支持 #rgb#rrggbbHTML 颜色
+
+ +

示例

+ +
<math>
+
+  <mrow>
+    <mn> 1 </mn>
+    <mo> + </mo>
+    <mn> 1 </mn>
+  </mrow>
+
+  <mrow>
+    <mo> ( </mo>
+    <mrow>
+      <mi> x </mi>
+      <mo> , </mo>
+      <mi> y </mi>
+    </mrow>
+    <mo> ) </mo>
+  </mrow>
+
+</math>
+
+ +

规范

+ + + + + + + + + + + + + + + + + + + + + +
规范状态备注
{{ SpecName('MathML3', 'chapter3.html#presm.mrow', 'mrow') }}{{ Spec2('MathML3') }}Current specification
{{ SpecName('MathML2', 'chapter3.html#presm.mrow', 'mrow') }}{{ Spec2('MathML2') }}Initial specification
+ +

浏览器兼容性

+ + + +

{{Compat("mathml.elements.mrow")}}

+ +

参见

+ +
    +
  • HTML 分组元素:{{ HTMLElement("div") }}
  • +
diff --git a/files/zh-cn/web/mathml/element/mspace/index.html b/files/zh-cn/web/mathml/element/mspace/index.html new file mode 100644 index 0000000000..85d5543c76 --- /dev/null +++ b/files/zh-cn/web/mathml/element/mspace/index.html @@ -0,0 +1,163 @@ +--- +title: +slug: Web/MathML/Element/mspace +translation_of: Web/MathML/Element/mspace +--- +
{{MathMLRef}}
+ +

MathML<mspace>元素用来表示一段空白,空白的大小由它自身的属性决定。

+ +

属性

+ +
+
class, id, style
+
用来供样式表使用。
+
depth
+
空白在基线下方的高度 (参阅 length).
+
height
+
空白在基线上方的高度 (参阅 length).
+
linebreak
+
Indicates a line-break at the space. Possible values: auto (default value), newline, nobreak, goodbreak, badbreak.
+ Starting with MathML 3, it is preferred to use {{ MathMLElement("mo") }} to control linebreaking.
+
mathbackground
+
用来设置背景色,可以使用#rgb#rrggbb或者HTML颜色名
+
width
+
空白的宽度 (参阅 length).
+
+ +

注意,一些像mathcolormathvariantdir这种常用的属性在<mspace>上是无效的。

+ +

例子

+ +
<math>
+
+  <mspace depth="40px" height="20px" />
+
+  <mspace width="100px" />
+
+</math>
+
+ +

规范

+ + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{ SpecName('MathML3', 'chapter3.html#presm.mspace', 'mspace') }}{{ Spec2('MathML3') }}Current specification
{{ SpecName('MathML2', 'chapter3.html#presm.mspace', 'mspace') }}{{ Spec2('MathML2') }}Initial specification
+ +

浏览器兼容性

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatNo}}{{ CompatGeckoDesktop("1.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
linebreak{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
depth, height, width{{CompatNo}}{{ CompatGeckoDesktop("1.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("1.9.2") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
linebreak{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
depth, height, width{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("1.9.2") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

Gecko说明

+ +
    +
  • Indentation attributes 暂时没有实现 (for Gecko see {{ bug("534962") }}).
  • +
  • 从Gecko 23.0 {{geckoRelease("23.0")}}开始实现了对width属性负值的支持。
  • +
+ +

相关链接

+ +
    +
  • {{ MathMLElement("mpadded") }}
  • +
  • {{ MathMLElement("mphantom") }}
  • +
diff --git a/files/zh-cn/web/mathml/element/msqrt/index.html b/files/zh-cn/web/mathml/element/msqrt/index.html new file mode 100644 index 0000000000..6c8871916a --- /dev/null +++ b/files/zh-cn/web/mathml/element/msqrt/index.html @@ -0,0 +1,169 @@ +--- +title: +slug: Web/MathML/Element/msqrt +translation_of: Web/MathML/Element/msqrt +--- +
{{MathMLRef}}
+ +

MathML<msqrt>元素用于表示一个平方根(不显示根指数)。它只接受一个参数,语法如下:<msqrt> base </msqrt>

+ +

属性

+ +
+
class, id, style
+
样式表使用。
+
href
+
用来设置标签点击后跳转的链接
+
mathbackground
+
用来设置标签的背景色,可以使用#rgb#rrggbb或者HTML颜色名
+
mathcolor
+
用来设置文字(包括根底数、根指数和根号本身)的颜色,同样可以使用#rgb#rrggbb或者HTML颜色名
+
+ +

例子

+ +

下述代码表示: root-x

+ +

您的浏览器的渲染结果: x

+ +
<math>
+
+  <msqrt>
+    <mi>x</mi>
+  </msqrt>
+
+</math>
+
+ +

规范

+ + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{ SpecName('MathML3', 'chapter3.html#presm.msqrt', 'msqrt') }}{{ Spec2('MathML3') }}Current specification
{{ SpecName('MathML2', 'chapter3.html#presm.msqrt', 'msqrt') }}{{ Spec2('MathML2') }}Initial specification
+ +

浏览器兼容性

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatNo}}{{ CompatGeckoDesktop("1.0") }}{{CompatNo}}{{CompatNo}}5.1
href{{CompatNo}}{{ CompatGeckoDesktop("7.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
mathbackground{{CompatNo}}{{ CompatGeckoDesktop("2.0") }}{{CompatNo}}{{CompatNo}}5.1
mathcolor{{CompatNo}}{{ CompatGeckoDesktop("2.0") }}{{CompatNo}}{{CompatNo}}5.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("1.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
href{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("7.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
mathbackground{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("2.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
mathcolor{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("2.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

相关链接

+ +
    +
  • {{ MathMLElement("mroot") }} (Radical with an index)
  • +
diff --git a/files/zh-cn/web/mathml/element/msub/index.html b/files/zh-cn/web/mathml/element/msub/index.html new file mode 100644 index 0000000000..8acea4f5bb --- /dev/null +++ b/files/zh-cn/web/mathml/element/msub/index.html @@ -0,0 +1,197 @@ +--- +title: +slug: Web/MathML/Element/msub +translation_of: Web/MathML/Element/msub +--- +
{{MathMLRef}}
+ +

MathML<msub>元素用来为表达式加下标,语法如下:<msub> base subscript </msub>

+ +

属性

+ +
+
class, id, style
+
样式表使用。
+
href
+
用来设置标签点击后跳转的链接。
+
mathbackground
+
用来设置标签的背景色,可以使用#rgb#rrggbb或者HTML颜色名
+
mathcolor
+
用来设置标签文字的颜色,同样可以使用#rgb#rrggbb或者HTML颜色名
+
subscriptshift
+
用来设置下标相对于表达式的基线的最小距离,它是一个长度值
+
+ +

例子

+ +

下述代码表示:x1

+ +

您的浏览器的渲染结果:  X 1

+ +
<math>
+
+  <msub>
+    <mi>X</mi>
+    <mn>1</mn>
+  </msub>
+
+</math>
+
+ +

规范

+ + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{ SpecName('MathML3', 'chapter3.html#presm.msub', 'msub') }}{{ Spec2('MathML3') }}Current specification
{{ SpecName('MathML2', 'chapter3.html#presm.msub', 'msub') }}{{ Spec2('MathML2') }}Initial specification
+ +

浏览器兼容性

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatNo}}{{ CompatGeckoDesktop("1.0") }}{{ CompatNo() }}{{CompatNo}}5.1
href{{CompatNo}}{{ CompatGeckoDesktop("7.0") }}{{ CompatNo() }}{{CompatNo}}{{CompatNo}}
mathbackground{{CompatNo}}{{ CompatGeckoDesktop("2.0") }}{{ CompatNo() }}{{CompatNo}}5.1
mathcolor{{CompatNo}}{{ CompatGeckoDesktop("2.0") }}{{ CompatNo() }}{{CompatNo}}5.1
subscriptshift{{CompatNo}}{{ CompatGeckoDesktop("1.0") }}{{ CompatNo() }}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{ CompatNo() }}{{ CompatNo() }}{{ CompatGeckoMobile("1.0") }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}
href{{ CompatNo() }}{{ CompatNo() }}{{ CompatGeckoMobile("7.0") }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}
mathbackground{{ CompatNo() }}{{ CompatNo() }}{{ CompatGeckoMobile("2.0") }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}
mathcolor{{ CompatNo() }}{{ CompatNo() }}{{ CompatGeckoMobile("2.0") }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}
subscriptshift{{ CompatNo() }}{{ CompatNo() }}{{ CompatGeckoMobile("1.0") }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}
+
+ +

关于Gecko的特殊说明

+ +
    +
  • 从Gecko 26.0 {{geckoRelease("26")}}开始,不允许使用<none />作为子元素。The rendering has been made more consistent with equivalent configurations of {{MathMLElement("msup")}} and {{MathMLElement("mmultiscripts")}} and a bug with an incorrect application of the superscriptshift attribute has been fixed (see {{bug("827713")}} for details).
  • +
+ +

相关链接

+ +
    +
  • {{ MathMLElement("msup") }} (Superscript)
  • +
  • {{ MathMLElement("msubsup") }} (Subscript-superscript pair)
  • +
  • {{ MathMLElement("mmultiscripts") }} (Prescripts and tensor indices)
  • +
diff --git a/files/zh-cn/web/mathml/element/msubsup/index.html b/files/zh-cn/web/mathml/element/msubsup/index.html new file mode 100644 index 0000000000..cf083f698e --- /dev/null +++ b/files/zh-cn/web/mathml/element/msubsup/index.html @@ -0,0 +1,87 @@ +--- +title: +slug: Web/MathML/Element/msubsup +tags: + - MathML + - MathML 参考 +translation_of: Web/MathML/Element/msubsup +--- +
{{MathMLRef}}
+ +

MathML <msubsup> 元素用于为表达式同时附加上角标和下角标。

+ +

它的语法如下:<msubsup> base subscript superscript </msubsup>.

+ +

属性

+ +
+
classidstyle
+
样式使用。
+
href
+
Used to set a hyperlink to a specified URI.
+
mathbackground
+
背景颜色。支持 #rgb#rrggbbHTML 颜色名称
+
mathcolor
+
文本颜色。支持 #rgb#rrggbbHTML 颜色名称
+
subscriptshift {{deprecated_inline}}
+
The minimum space by which to shift the subscript below the baseline of the expression, as a length value.
+ This attribute is deprecated and will be removed in the future.
+
superscriptshift {{deprecated_inline}}
+
The minimum space by which to shift the superscript above the baseline of the expression, as a length value.
+ This attribute is deprecated and will be removed in the future.
+
+ +

示例

+ +

示例渲染结果:x1

+ +

当前浏览器中的渲染结果: 0 1

+ +
<math displaystyle="true">
+
+  <msubsup>
+    <mo> &#x222B;<!-- 积分符号 --> </mo>
+    <mn> 0 </mn>
+    <mn> 1 </mn>
+  </msubsup>
+
+</math>
+
+ +

规范

+ + + + + + + + + + + + + + + + + + + + + +
规范状态备注
{{ SpecName('MathML3', 'chapter3.html#presm.msubsup', 'msubsup') }}{{ Spec2('MathML3') }}Current specification
{{ SpecName('MathML2', 'chapter3.html#presm.msubsup', 'msubsup') }}{{ Spec2('MathML2') }}Initial specification
+ +

浏览器兼容性

+ + + +

{{Compat("mathml.elements.msubsup")}}

+ +

参见

+ +
    +
  • {{ MathMLElement("msub") }}(上标)
  • +
  • {{ MathMLElement("msup") }}(下标)
  • +
  • {{ MathMLElement("mmultiscripts") }}(Prescript 和 tensor indice)
  • +
diff --git a/files/zh-cn/web/mathml/element/msup/index.html b/files/zh-cn/web/mathml/element/msup/index.html new file mode 100644 index 0000000000..36513dd6f7 --- /dev/null +++ b/files/zh-cn/web/mathml/element/msup/index.html @@ -0,0 +1,90 @@ +--- +title: +slug: Web/MathML/Element/msup +tags: + - MathML + - MathML 元素 + - MathML 参考 +translation_of: Web/MathML/Element/msup +--- +
{{MathMLRef}}
+ +

MathML <msup> 元素用于为表达式加上标。

+ +

语法如下:<msup> base superscript </msup>

+ +

属性

+ +
+
class, id, style
+
用来供样式表使用。
+
href
+
用来设置标签点击后跳转的链接。
+
mathbackground
+
用来设置背景色,可以使用 #rgb#rrggbb 或者 HTML 颜色名
+
mathcolor
+
用来设置文字颜色,同样可以使用 #rgb#rrggbb 或者 HTML 颜色名
+
superscriptshift {{deprecated_inline}}
+
用来设置上标相对于表达式的基线的最小距离,它是一个长度值
+ 此属性已被弃用,且将在未来被删除。
+
+ +

例子

+ +

下述代码表示:x1

+ +

您的浏览器的渲染结果: X 2

+ +
<math>
+
+  <msup>
+    <mi>X</mi>
+    <mn>2</mn>
+  </msup>
+
+</math>
+
+ +

规范

+ + + + + + + + + + + + + + + + + + + + + +
规范状态备注
{{ SpecName('MathML3', 'chapter3.html#presm.msup', 'msup') }}{{ Spec2('MathML3') }}Current specification
{{ SpecName('MathML2', 'chapter3.html#presm.msup', 'msup') }}{{ Spec2('MathML2') }}Initial specification
+ +

浏览器兼容性

+ + + +

{{Compat("mathml.elements.msup")}}

+ +

Gecko说明

+ +
    +
  • 从 Gecko 26.0 {{geckoRelease("26")}} 开始,不再支持使用 <none /> 作为子元素。并且渲染结果和 {{MathMLElement("msub")}} 和 {{MathMLElement("mmultiscripts")}} 这些等价配置更加接近,同时修复了一个关于 superscriptshift 属性错误使用的问题(参阅 {{bug("827713")}}).
  • +
+ +

参见

+ +
    +
  • {{ MathMLElement("msub") }}(下标)
  • +
  • {{ MathMLElement("msubsup") }}(上下标)
  • +
  • {{ MathMLElement("mmultiscripts") }}(四角标,张量式标记)
  • +
-- cgit v1.2.3-54-g00ecf