Last modified: 2013-02-07 08:34:54 UTC
I think I have found a bug in the wikipedia PDF renderer. Go to this page: http://en.wikipedia.org/wiki/Bicarbonate. In the chemistry box on the right, there is the "Properties" section with "Molecular formula" as the first record. This record has the value of "CHO_3^-". Now download the PDF of the page. You will see that in the PDF the same record has the incorrect value of "CHO". The same applies to http://en.wikipedia.org/wiki/Carbonate, where "CO_3^2-" becomes "CO" in the PDF. This does <u>NOT</u> apply to non-ions like http://en.wikipedia.org/wiki/Sulfuric_acid, so I think that the problem are the superscripts, while subscripts cause no problems. Particularly, it should be the "{{Chem|text|subscript|superscript}}" tag. If there is no superscript, the PDF is rendered correctly. If there is the superscript, the renderer seems to ignore both the sub and the super scripts.
This is due to the fact that there is no good way to universally format math and chem formulas yet. The problem comes from the fact of having to use a subscript and a superscript at the SAME time, which is not something that is supported in HTML. If both are present, a 'trick' is used and the PDF renderer (rightfully) doesn't understand the trick. Problems like these won't ever be fully solved until MathML has further matured. Idea. use an 'alt' text if the template needs to show both sup and sub, and let the PDF rendere fallback to the alt text instead of just 'stripping' the html out of the rendering.