1

这是我用来测试 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>&sum;</mo>
    <mrow>
      <mi>p</mi>
      <mtext>&nbsp;prime</mtext>
    </mrow>
  </munder>
  <mi>f</mi>
  <mo stretchy="false">(</mo>
  <mi>p</mi>
  <mo stretchy="false">)</mo>
  <mo>=</mo>
  <msub>
    <mo stretchy="false">&int;</mo>
    <mrow>
      <mi>t</mi>
      <mo>&gt;</mo>
      <mn>1</mn>
    </mrow>
  </msub>
  <mi>f</mi>
  <mo stretchy="false">(</mo>
  <mi>t</mi>
  <mo stretchy="false">)</mo>
  <mo>&ThinSpace;</mo>
  <mo mathvariant="italic">d</mo>
  <mi>&pi;</mi>
  <mo stretchy="false">(</mo>
  <mi>t</mi>
  <mo stretchy="false">)</mo>
</mrow>
</math>
</body>
</html>

在 Windows XP 上使用 Firefox 8 输出:

在 Windows XP 上使用 Firefox

在 Debian GNU/Linux 上使用 Firefox 8 输出:

在 Windows XP 上使用 Firefox

现在,考虑到不能要求网站的用户安装新字体等,有哪些可能的方法可以确保 Windows 用户在浏览用 MathML 编写的数学公式时也有良好的体验?

4

1 回答 1

0

以下是目前正在研究 Firefox MathML 的主要人员(Frédéric Wang)的回答,尽管我怀疑它是否会让您在短期内感到高兴:

用户需要安装 STIX 或 Asana 字体才能获得不错的 MathML 渲染。也许可以使用可下载字体来强制在给定网页上使用这些字体,但我从未尝试过。

两个可能很有趣的错误:

于 2012-02-01T17:29:23.997 回答