Last modified: 2014-05-26 17:19:53 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 T67397, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65397 - formula datatype
formula datatype
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
master
All All
: Normal normal (vote)
: ---
Assigned To: Wikidata bugs
: need-volunteer
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-16 14:07 UTC by Lydia Pintscher
Modified: 2014-05-26 17:19 UTC (History)
4 users (show)

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


Attachments

Description Lydia Pintscher 2014-05-16 14:07:47 UTC
We need a new datatype to store mathematical formulas. This should be done using mathml and be based on the string datatype.
Comment 1 Bene* 2014-05-23 15:15:55 UTC
Although mathml sounds good I fear the browser support [1] is too bad to use the native browser implementation. My suggestion is to make use of the Math extension [2] and store the formulars in TEX format. The formulars then would be rendered on item pages like they get rendered on wiki pages, too. I don't know how hard it is to use the extension but imo it is preferable over the use of mathml.

[1] http://caniuse.com/mathml
[2] https://www.mediawiki.org/wiki/Extension:Math
Comment 2 Lydia Pintscher 2014-05-26 13:47:36 UTC
I thought that extension uses mathml? Either way we should store it in a way that can easily be re-used on the client.
Daniel: What's your take on this?
Comment 3 Daniel Kinzler 2014-05-26 14:01:39 UTC
This is tricky... MathML is by far easier to re-use by third parties, and in general a saner format for storing formula. But we don't have any facilities for rendering it server side for clients that don't support it well enough. 

For TeX syntax, we have a tried-and-true rendering backend that can render to PNG and MathML (and perhaps SVG in the future). This would make it a lot easier to implement formula display, but we would be stuck with TeX for the internal representation. 

With regards to editing, there is another trade-off: TeX formula are a lot easier to edit by hand, but MathML is easier to handle by third party editors.

Ideally, we would be able to convert between MathML and TeX on the fly. For simple things, that should work fine, but...
Comment 4 Bene* 2014-05-26 16:50:59 UTC
Ok, I think a conversion between MathML and TeX would be great but not high priority at the moment. However there might be existing TeX to MathML converters. Now you must decide which format to use.
Comment 5 Tobias 2014-05-26 17:19:53 UTC
I was wondering too, if either MathML or TEX could store the item information instead of just the symbols. The symbols could be stored in another property and used just for display:

If we take the formula E = mc², then the formula could also look like this:

E = mc²
{{Q|11379}} = {{Q|11423}} * ({{Q|2111}})²

So instead of symbols we would really link to the objects or concepts that are behind the symbols. The letter e is ambigeous, but we could link to either 'variable' or 'Euler Number'.

Same thing for chemical formulas. 'Fe' could stand for 'variable' * 'variable' or 'iron (element)'.

Even more of the formula would be captured if the subscripts and superscripts would be distinguished between for example: superscript 2 could mean 'exponent' (x² = x squared) or 'electric charge' (Fe² = Iron ion charged 2 times positive).

Maybe this type of datatype doesn't exist yet, but it would be really powerful in my opinion.

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


Navigation
Links