Extension:Blahtex/Bugs in browser MathML support

''This page has been superseded. The new bug reporting page is located at Extension:Blahtex/Bugs.''

OLD CONTENT
This page is where to report bugs in browser support for MathML that are relevant to Extension:blahtex.

Attention browser developers! You are cordially invited to fix these bugs!

Best practice for reporting bugs:
 * Give details on the browser version and operating system, and
 * Give examples of LaTeX (better: MathML) markup that you think are broken, and
 * Give screenshots (preferably small ones) if you have the time to make them.

Blahtex has decent workarounds for some of the bugs. For others it doesn't (yet). The workarounds are activated by a command line switch like "-tweak-mozilla171-win" (this is the only such switch available in blahtex 0.2.1.)

This page is a bit like an "article" page and a bit like a "talk" page. You may discuss things here like on a "talk" page, but the conversation may eventually be distilled into something more succint. Use the actual talk page if you don't want your conversation to be summarised like this.

Mozilla, Firefox, Netscape
These three browsers use the same underlying rendering code (which is all open source). Therefore MathML bugs in one are likely to exist in the others, even across different operating systems. The name Mozilla is often used to refer to any browser from the family.

The Mozilla project maintains its own bug page (Bug 120198) for reporting errors in their own demos.

Most of the development effort on blahtex has been focussed on the Mozilla family of browsers, for a variety of reasons (mainly political :-)).

Internet Explorer + MathPlayer
Internet Explorer 6.0 can display MathML with a free plugin called MathPlayer (by Design Science).

Safari
Safari 1.3 has no MathML support at all. It often pretends that it does, but it is lying.

Techexplorer
Techexplorer is a plugin that provides MathML support on a variety of browsers and operating systems. (In fact, its main purpose seems to be to directly interpret LaTeX files picked up by the browser, but it allegedly supports MathML as well.)

So far I have only tried it on Safari 1.3 (mac) and Firefox 1.0.4 (mac). I was unable to get decent enough results on either browser to do proper testing. One difficulty is that it does not recognise the usual MIME types that browsers are supposed to recognise &mdash; it requires something like "text/mathml" instead &mdash; so it requires some fiddling with the web server to make it wake up at all.

Please let me know if you have any better luck.


 * Polx offered the following comment (which I have not followed up yet) on my user talk page:
 * I remember my tests were also frustrating until David Carlisle made the hint that the embed tag should be used and that's one that worked... look in the archive of www-math@w3.org for a pointer, I think. 
 * Dmharvey 14:32, 16 August 2005 (UTC)

Mozilla for Mac OS X

 * Status: looking good

Serious progress has been made on OS X support since Firebox 1.5 beta 2. (Thanks Roger and others for getting this moving!)

To get this working on Tiger this worked for me:
 * 1) Use Firefox 1.5 beta 2
 * 2) Install the fonts from here.
 * 3) Add the line user_pref("font.mathfont-family", "Math1, Math2, Math4"); to prefs.js

Looks great with blahtex, but minus signs do not show up (see this bug)Juliusross 13:49, 21 October 2005 (UTC)


 * Just to keep the information flowing between people who seem interested in solving this problem:
 * http://www.ms.u-tokyo.ac.jp/~makotoy/ffmath/screenshots.html

Space between adjacent token elements

 * Reported by: Dmharvey
 * Browsers affected: whole Mozilla family (e.g. Firefox 1.0.5 on windows XP)
 * Status: fixed in Firefox 1.5 beta 2 (due for release early October 2005).
 * I have tested this on a nightly firefox build and it looks good. Dmharvey 03:08, 17 September 2005 (UTC)
 * Consequently the workaround present in blahtex 0.2.1 will be removed in blahtex 0.3.

Description
There is far too much space between the "d" and "x" in simple markup like this: &amp;int; d x Screenshot showing the above markup on Firefox 1.0.5 (win XP):



The same spacing problem occurs between adjacent  ... ,  ...  and  ... </tt> blocks.

Here is the same markup rendered by IE + MathPlayer:



Yes, it does look awful :-), but the point is that the inter-character spacing is okay.

Incorrect propagation of scriptlevel

 * Reported by: Dmharvey 14:57, 12 August 2005 (UTC). (Manifestations of this bug were first reported by Omegatron &mdash; see Bug: Infinity symbol size and Bug: Roman font subscripts look bigger than italics.)
 * Browsers affected: whole Mozilla family (e.g. Firefox 1.0.5 on windows XP)
 * Status: <font style="color: green;">fixed in Firefox 1.5 beta 2 (due for release early October 2005).
 * I have tested this on a nightly firefox build and it looks good. Dmharvey 03:10, 17 September 2005 (UTC)

Description
Mozilla does not propagate the scriptlevel attribute correctly when a child element of certain types of layout/script elements has any explicit attributes given.


 * Examples removed because the bug in firefox has been fixed. Dmharvey 03:10, 17 September 2005 (UTC)

The "&amp;nbsp;" entity has negative width

 * Reported by: Dmharvey in early August 2005
 * Browsers affected: whole Mozilla family (e.g. Firefox 1.0.5 on windows XP)
 * Status: <font style="color: green;">fixed in Firefox 1.5 beta 2 (due for release early October 2005).
 * I have tested this on a nightly firefox build and it looks good. Dmharvey 03:10, 17 September 2005 (UTC)
 * Consequently the workaround present in blahtex 0.2.1 will be removed in blahtex 0.3.

Description
In something like
 * hello&amp;nbsp;&amp;nbsp; x</mi>

the x is drawn on top of the "hello". It seems like the &amp;nbsp; entity has negative width.

Primes in bold font are placed too high

 * Reported by: Dmharvey in early August 2005
 * Browsers affected: whole Mozilla family (e.g. Firefox 1.0.5 on windows XP)
 * Status: <font style="color: green;">decent workaround in version 0.2.1.

In something like
 * x</mi> &amp;prime;</mo>

the bolded prime is way too high.

Blahtex's workaround is simply to draw it in normal font. (No big deal. Who uses bold primes anyway?)


 * Note: maybe this is yet another manifestation of the "incorrect propagation of scriptlevel bug" in mozilla? Need to check this out. Dmharvey 11:58, 27 August 2005 (UTC)

Various font commands are broken
Mozilla simply ignores the font command on something like
 * <mi mathvariant="double-struck">R</mi>

Similarly for the following fonts: script, bold script, fraktur, bold fraktur.

Blahtex's workaround is to explicitly substitute entities. For example, the above sequence becomes
 * <mi mathvariant="normal">&amp;Ropf;</mi>

Surprisingly, this actually works, in the sense that the system has the relevant characters available, although they don't look that great.

I suspect this may be operating system-dependent. If anyone knows what happens under some other systems, I want to hear about it.


 * Note: Mozilla developers have informed me that Mozilla does not currently have full support for MathML 2.0 font attributes. They confirm that the above workaround is okay, and that MathML 1.1 font attributes should be used in this situation. Blahtex 0.3 will do this. Dmharvey 03:16, 17 September 2005 (UTC)

Vertical stretching of double vertical bar is broken
Mozilla is unable to vertically stretch the "&amp;Vert;" entity. This is bad news for LaTeX fragments like "\left\Vert" and "\begin{Vmatrix}".

Blahtex's workaround is to replace any stretchy double vertical bar by two consecutive stretchy single bars. They end up spaced slightly too far apart, but it's not so noticable, especially when they're so tall anyway.

Certain other operators also don't stretch
For example: &Vee; (a.k.a. &bigvee; ) doesn't stretch. It should. No workaround for this one.

Ditto &Wedge; (a.k.a. &bigwedge; ) and &Coproduct; ( &coprod; ).

Sometimes parentheses just don't stretch properly
(Mozilla)

For example, the translation of "\binom{2n}{n}" is OK, but in the translation of "\binom{n}{n}", the parentheses around the binomial expression just aren't quite big enough.

I don't know the exact cause of this. There is currently no workaround.

Tables with missing entries
(Mozilla)

Sometimes tables with missing entries, like
 * 1 2    3

have their entries put in strange places. According to the MathML standard, the "3" should appear directly below the "1", but Mozilla sometimes puts it somewhat to the right.

Currently there is no workaround.

(It would be possible to "fill in" the missing entries, but that would give nasty users the opportunity to generate output whose length is quadratic in the length of the input, which I don't want to do, unless we put a hard limit on the output length.)

Some anti-aliasing doesn't work
(Mozilla)

I'm not sure if this is a bug in Mozilla or Windows. An example is with the "\widehat" command; the hat is not anti-aliased properly (even by Windows' ClearType system). Such pixelation doesn't look very good.

Stretched operators sometimes have gaps
(Mozilla)

For example, if you do "\big\uparrow", the up arrow has tiny gaps in it.


 * Mozilla developers have indicated that this is fixed in Firefox 1.5 beta 2. I haven't tested it yet. Dmharvey 03:17, 17 September 2005 (UTC)

Order of characters affects glyph selection
(Mozilla)

When the "fancy fonts" workaround is activated (see above under "Various font commands are broken"), the commands \mathbb{RA} and \mathbb{AR} end up rendering the "R" differently. This is very odd.


 * Mozilla developers have indicated that this is related to the incomplete MathML 2.0 font attribute support. Apparently using MathML 1.1 attributes should fix this. This will be corrected in blahtex 0.3. Dmharvey 03:19, 17 September 2005 (UTC)

Integral limits places incorrectly
(Mozilla)

The upper limit is placed incorrectly on something like this:
 * &amp;int;</mo>0</mn>1</mn>.

The MathML standard is very clear on what should be happening here.

Bug: &it; does not render

 * Reported by: R.Koot 16:11, 7 August 2005 (UTC)
 * Browsers affected: Mozilla browsers on certain Linux systems
 * Status: <font style="color: green;">irrelevant (see "Solution" below)

Description
&it; is not supported on my system (SuSE 9.0 + Firefox 1.0.5) and renders as an ugly unsupported Unicode character box.

Discussion
I have the same problem, but I think it is just a question of installing the correct fonts. I'll get back if I find out what font to install. -- Jitse Niesen 17:35, 7 August 2005 (UTC)


 * I guess any Unicode font would work (Lucida, Arial Unicode, Tahoma), unfortunatly I don't have any Unicode fonts installed. It would be great if it renders using Bitream Vera, a popular Linux font. --R. Koot


 * I also guess that &it; stands for italic seperator, so couldn't it just be replaced with a space? --R. Koot

&it; is short for &InvisibleTimes;, it is the thing between 2 and x in the product 2x, or between x and y in xy. I spent half an hour looking for and installing fonts, but no luck. Pretty frustrating that we are having problems with things that should be invisible! -- Jitse Niesen 19:43, 7 August 2005 (UTC)

I now think it is not due to some font not being installed. It might be a bug in Firefox, but then it's strange that Dmharvey does not have this problem. I'm using Debian and Firefox 1.0.4. I also tried another web browser with MathML support, Amaya, and that one displays &it; correctly, i.e., not at all. -- Jitse Niesen 22:35, 7 August 2005 (UTC)


 * I can confirm that Firefox 1.0.4 on mac OS 10.3.9, and Mozilla 1.6 on windows XP, and Firefox 1.0.6 on XP, all display &it; correctly (i.e. not at all). Dmharvey 23:41, 7 August 2005 (UTC)

It also works correctly on my computer at work, which is Fedora (Core 2 I think) with Firefox 1.0.6. I'll try upgrading firefox on my machine with Debian and Firefox 1.0.4 at home and see whether that helps. -- Jitse Niesen 12:59, 8 August 2005 (UTC)


 * Didn't you have to install a font package in an older version of Firefox to get mathml? Something from http://www.mozilla.org/projects/mathml/ or MIT(??), if I remember correctly.  I assume everything is set up for you in the latest versions, or else I just have the fonts still on my computer from way back when I installed them by hand... - Omegatron 19:16, 8 August 2005 (UTC)

Upgrading to Firefox 1.0.6 did not help :( . I have all fonts from http://www.mozilla.org/projects/mathml/ installed, but Firefox still complains that it can't find the Symbol font. So, it's working for you, Omegatron? What OS? -- Jitse Niesen 19:35, 8 August 2005 (UTC)


 * You should install Adobe Acrobat Reader 7.0 for the Symbol font (the other symbol font actually is Standard Symbols L). -- Ruud


 * Installed the font (I actually already had the font but it was not found), the warning has gone away (thanks), but I still get a box with 2062 instead of &amp;it; -- Jitse Niesen 22:03, 9 August 2005 (UTC)

If this problem is persisting, maybe it's necessary for blahtex to include a workaround. Question: do you get the nasty "too much space between  tags" problem if you simply leave out the &it operators? Like, what does this MathML do:
 * d</mi>x</mi>

? Dmharvey 20:44, 9 August 2005 (UTC)


 * I think there is a very simple solution, it is just around the corner waiting till I find it and laughing at my stumbling around blindly ... seriously though, I'd like to find out what's going wrong instead of having a workarond. The MathML gives a space between the d and the x, about as wide as the space between two words. -- Jitse Niesen 22:03, 9 August 2005 (UTC)


 * I posted a question at MozillaZine about this. -- Jitse Niesen 17:43, 11 August 2005 (UTC)

I have the same problem with x86 Debian GNU/Linux testing on a Dell Inspiron 1100 and unstable on a PIII desktop system with Mozilla 1.7.11 and Firefox 1.0.6. Both these programs are xft-enabled, thus MathML TTF are required. I have both the latex-xft-fonts, and the downloaded MathML TTF installed, to no avail. -- Gernot Hassenpflug 03:05, 15 September 2005 (UTC)

Solution
Due to some fixes in Mozilla (e.g. try the latest nightly Firefox trunk builds, we're expecting it to make official releases in Firefox 1.5 beta 2), blahtex 0.3 will no longer need to output &amp;it; or &amp;af; entities. So the problem remains, but will not affect users of blahtex. Dmharvey 11:36, 15 September 2005 (UTC)


 * Also, rumour has it that &amp;it; and &amp;af (and I also believe the invisible comma, which blahtex never used) will be handled correctly by the newer Mozilla versions, regardless of which fonts are installed; however I have not tested this. Dmharvey 11:38, 15 September 2005 (UTC)

Arrow accents (i.e. "\vec") not drawn correctly
(Mozilla)


 * Reported by: Dmharvey 22:39, 9 August 2005 (UTC)
 * Status: <font style="color: orange;">workaround planned for version 0.3.

The arrow in an expression like "\vec x" is drawn too large and placed too far to the left.

For example, see 34280d6f070df70af3dea2c45dfa9dff on the online sample page.

The offending MathML markup is something like: x</mi>&amp;rarr;</mo>

(MathPlayer seems to get it right -- though it's difficult to tell because of its pixelation problems.)

I'm wondering if Linux Firefox has a similar problem? Dmharvey 22:39, 9 August 2005 (UTC)


 * Well, it's interesting. If I type "\vec x" in the interactive page, Linux Firefox on my laptop does not display the arrow, and it does not display the text between the lines showing the MathML code, nor the link to .../blahtex/index.php (however, I can still click on the link). The online sample page shows very strange phenomena, e.g., all minus signs are missing. I guess I shouldn't have upgraded Firefox! -- Jitse Niesen 21:24, 10 August 2005 (UTC)


 * Okay, that was caused by my installing the Symbol font from Acrobat. After removing it, the strange phenomena disappeared. The arrow is indeed too large (see screen shot). -- Jitse Niesen 21:45, 10 August 2005 (UTC)


 * Jitse, should this Acrobat symbol font problem be listed as a separate bug? Dmharvey 11:36, 12 August 2005 (UTC)


 * Perhaps, but I'm not sure if it is a MathML bug. It's a mysterious bug anyway. There is some discussion about it on Debian bug #307129. -- Jitse Niesen 12:49, 12 August 2005 (UTC)

Blahtex's workaround
Version 0.3 will do it by using the entity "&amp;#x20d7;" instead of "&amp;rarr;". This solution was suggested by the output of this online converter. Dmharvey 11:34, 12 August 2005 (UTC)

Linux Firefox
I just started it. Version 1.0.4 right now, and it says:
 * To properly display the MathML on this page you need to install the following fonts:
 * CMSY10, CMEX10, Math1, Math2, Math4, Symbol.
 * For further information see:
 * http://www.mozilla.org/projects/mathml/fonts

Just writing this down because it is going to disappear when I click OK and there's no way to copy and paste it. - Omegatron 23:06, 10 August 2005 (UTC)


 * Alright, I updated everything (a few months worth of updates, plus my parents called...) Anyway, it upgraded to Firefox 1.0.6 but didn't magically download the fonts for me, and I don't see any mathml-related packages, so it's not really worth the effort.  If you really want me to, I will, but I hate Linux so not today. - Omegatron 01:19, 11 August 2005 (UTC)


 * (is this "Linux Firefox" section meant to be a subsection of the previous stuff on "\vec"?) Dmharvey 10:34, 11 August 2005 (UTC)


 * Just a note, Fedora Core 4 now includes a package called mathml-fonts that installs the TeX fonts that Mozilla needs, though Mozilla will still pop up this dialog if you don't have the Mathematica fonts. I think this package was added in October of 2005. &mdash; db48x | Talk 09:02, 2 January 2006 (UTC)