Roger B. Sidje
2005-09-01 03:48:16 UTC
As raised several times in this newsgroup (and privately with some
people), the current inter-space between MathML frames, albeit
context-sensitive, is not always ideal. To many people, the all too
common $dx$ in integrands has so far been showing up as a perplexing
"d x" in Gecko...
These inter-spacing issues started hitting Wikipedia folks particularly
hard, as they are investigating what it will take to move from TeX PNGs
images to MathML, with currently over 50,000 equations on the English
Wikipedia alone...
Revisiting the inter-spacing is something that I have always hoped to
do. I have now been able to do so, and have submitted the changes on bug
306543.
[bugzilla]https://bugzilla.mozilla.org/show_bug.cgi?id=306543
You can see the improvements on this PDF document:
[PDF-400K]https://bugzilla.mozilla.org/attachment.cgi?id=194502
The PDF was produced by browsing this MathML Page:
[MathML-180K]http://abel.math.harvard.edu/~dmharvey/blahtex/0.2/page-34.php
I got the PDF from the browser (with the patch) by just printing that
page to a PDF driver (PDFCreator in this case), hence it is as-is. It is
hard to tell the difference with TeX PNGs now. (You will notice that the
maths use TeX fonts across the board instead of the usual Times Roman.
For the purpose of testing the patch, I did set TeX fonts in mathml.css
-- that's all. They look okay on the PDF but don't anti-alias very well
on the browser screen itself. That's why I still haven't set them as the
default in place of Times Roman in the release builds.)
While still not the end of the road, the patch solves most of the cases
that people have been talking about, as can been seen on the PDF. But as
usual, there are edges cases such as $y = b \, \sin t$ or
<mrow>
<mi>y</mi>
<mo>=</mo>
<mi>b</mi>
<mspace width="0.1em"/>
<mi>sin</mi>
<mo>⁡</mo>
<mi>t</mi>
</mrow>
This renders (with the patch) with only an inter-space of "0.1em"
between b and sin (c.f. the PDF). By contrast, TeX will put \, in
*addition* to the intrinsic left-space that it knows for its operator
\sin. As \sin (and others) aren't built-in operators for us, I wonder
about special-casing <mspace> to recover TeX behavior here.
Keep a watch on bug 306543 to follow further developments.
Unfortunately, it is a large patch, and I don't feel like fighting to
get it into the upcoming Firefox 1.5 (Gecko1.8) which has already
branched off from the trunk (if somebody wants to fight for that, go
ahead...). In any case, expect these improvements in Firefox 2.0
(Gecko1.9) -- which might be a year or so away. In the meantime, they
will in the nightly builds soon after the patch is checked in the trunk.
---
RBS
PS: There are some oddities with the spacing values of the factorial
operator "!". The values for form="prefix" and form="postfix" seem to
have been inverted in the sample MathML REC's Operator Dictionary.
people), the current inter-space between MathML frames, albeit
context-sensitive, is not always ideal. To many people, the all too
common $dx$ in integrands has so far been showing up as a perplexing
"d x" in Gecko...
These inter-spacing issues started hitting Wikipedia folks particularly
hard, as they are investigating what it will take to move from TeX PNGs
images to MathML, with currently over 50,000 equations on the English
Wikipedia alone...
Revisiting the inter-spacing is something that I have always hoped to
do. I have now been able to do so, and have submitted the changes on bug
306543.
[bugzilla]https://bugzilla.mozilla.org/show_bug.cgi?id=306543
You can see the improvements on this PDF document:
[PDF-400K]https://bugzilla.mozilla.org/attachment.cgi?id=194502
The PDF was produced by browsing this MathML Page:
[MathML-180K]http://abel.math.harvard.edu/~dmharvey/blahtex/0.2/page-34.php
I got the PDF from the browser (with the patch) by just printing that
page to a PDF driver (PDFCreator in this case), hence it is as-is. It is
hard to tell the difference with TeX PNGs now. (You will notice that the
maths use TeX fonts across the board instead of the usual Times Roman.
For the purpose of testing the patch, I did set TeX fonts in mathml.css
-- that's all. They look okay on the PDF but don't anti-alias very well
on the browser screen itself. That's why I still haven't set them as the
default in place of Times Roman in the release builds.)
While still not the end of the road, the patch solves most of the cases
that people have been talking about, as can been seen on the PDF. But as
usual, there are edges cases such as $y = b \, \sin t$ or
<mrow>
<mi>y</mi>
<mo>=</mo>
<mi>b</mi>
<mspace width="0.1em"/>
<mi>sin</mi>
<mo>⁡</mo>
<mi>t</mi>
</mrow>
This renders (with the patch) with only an inter-space of "0.1em"
between b and sin (c.f. the PDF). By contrast, TeX will put \, in
*addition* to the intrinsic left-space that it knows for its operator
\sin. As \sin (and others) aren't built-in operators for us, I wonder
about special-casing <mspace> to recover TeX behavior here.
Keep a watch on bug 306543 to follow further developments.
Unfortunately, it is a large patch, and I don't feel like fighting to
get it into the upcoming Firefox 1.5 (Gecko1.8) which has already
branched off from the trunk (if somebody wants to fight for that, go
ahead...). In any case, expect these improvements in Firefox 2.0
(Gecko1.9) -- which might be a year or so away. In the meantime, they
will in the nightly builds soon after the patch is checked in the trunk.
---
RBS
PS: There are some oddities with the spacing values of the factorial
operator "!". The values for form="prefix" and form="postfix" seem to
have been inverted in the sample MathML REC's Operator Dictionary.