在Windows XP上使用Firefox,MathML表现不佳,但在Linux上表现良好

时间:2012-01-30 20:01:09

标签: html firefox mathml

这是我用来测试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输出:

With Firefox on Windows XP

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

With Firefox on Windows XP

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

1 个答案:

答案 0 :(得分:0)

以下是现在使用Firefox MathML的主要人物(FrédéricWang)的回答,但我怀疑它会让你在短期内感到高兴:

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

可能有趣的两个错误: