2012-01-30 36 views
1

以下是我用来测试MathML渲染的MathML示例代码。MathML在Windows XP上使用Firefox渲染效果不佳,但在Linux上渲染良好

演示网址:在Windows XP 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> 

输出与Firefox 8:在Debian GNU/Linux的

With Firefox on Windows XP

输出与Firefox 8:

With Firefox on Windows XP

现在,考虑到不能坚持网站用户安装新字体等等,有什么方法可以确保Windows用户在使用MathML编写数学公式方面也有很好的体验?

回答

0

下面是主要的家伙在Firefox MATHML现在(弗雷德里克·王)工作的一个答案,但我怀疑它会让你在短期高兴:

用户需要安装STIX或体位的字体得到体面的MathML渲染。也许可以使用可下载的字体来强制这些字体在给定的网页上使用,但我从来没有尝试过。

的两个问题,可能是有趣: