在尝试学习 MathML 时,我发现本教程
中使用的
mfenced
元素已被弃用,因此 Firefox 不再支持它。 MathML 官方文档中的此示例仅分别使用 <mo>(</mo>
和
<mo>)</mo>
将分数括在括号中。当我尝试这个时,我发现括号具有正常高度,并且没有拉伸到分数的高度。然而示例代码没有特殊属性来控制括号高度,这表明它应该自动调整(就像在 LaTeX 中一样)。缺什么?下面是我的代码。
<!DOCTYPE html>
<html>
<head>
<title>MathML in HTML5</title>
</head>
<body>
<p>
<math>
<mo>(</mo>
<mfrac linethickness="0">
<mrow><mn>5</mn></mrow>
<mrow><mn>2</mn></mrow>
</mfrac>
<mo>)</mo>
<mo>=</mo><mn>10</mn>
</math>
</p>
</body>
</html>
mrow
来包围
mo
的东西:
<mfenced>
替换为
<mrow><mo>(</mo>
</mfenced>
替换为
<mo>)</mo></mrow>
<math>
<mrow>
<mo fence="true" stretchy="true">(</mo)
...
<mo fence="true" stretchy="true">)</mo)
...
</mrow>
</math>
见
MathML 手册
作者:帕维·桑德胡
国际书号:1584502495
查尔斯河媒体 © 2003 (518
页)