Last modified: 2013-02-07 08:34:54 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42042, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40042 - PDFs do not include superscript for chemical formulas ("Chem" tag)
PDFs do not include superscript for chemical formulas ("Chem" tag)
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Collection (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-06 08:14 UTC by Raffaele Mancuso
Modified: 2013-02-07 08:34 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Raffaele Mancuso 2012-09-06 08:14:32 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.
Comment 1 Derk-Jan Hartman 2012-10-22 17:02:51 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links