这是我用来测试 MathML 渲染的 MathML 示例代码。
演示网址:http: //jsfiddle.net/3ak4P/
<!DOCTYPE html>
<html lang="en">
<head>
<title>MathML demo</title>
<style type="text/css">
math {
display: block;
font-size: 16px;
}
</style>
</head>
<body>
<math>
<mrow>
<munder>
<mo>∑</mo>
<mrow>
<mi>p</mi>
<mtext> prime</mtext>
</mrow>
</munder>
<mi>f</mi>
<mo stretchy="false">(</mo>
<mi>p</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<msub>
<mo stretchy="false">∫</mo>
<mrow>
<mi>t</mi>
<mo>></mo>
<mn>1</mn>
</mrow>
</msub>
<mi>f</mi>
<mo stretchy="false">(</mo>
<mi>t</mi>
<mo stretchy="false">)</mo>
<mo> </mo>
<mo mathvariant="italic">d</mo>
<mi>π</mi>
<mo stretchy="false">(</mo>
<mi>t</mi>
<mo stretchy="false">)</mo>
</mrow>
</math>
</body>
</html>
在 Windows XP 上使用 Firefox 8 输出:
在 Debian GNU/Linux 上使用 Firefox 8 输出:
现在,考虑到不能要求网站的用户安装新字体等,有哪些可能的方法可以确保 Windows 用户在浏览用 MathML 编写的数学公式时也有良好的体验?