I used the rest interface to get closer to the origin of the problem:
Formulae are returned as
</binding> <binding name='formula'> <literal datatype='http://www.w3.org/1998/Math/MathML'>><math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
which does not seem reasonable.
Where does the literal, and with the datatype attribute come from?
Is there a chance to fix that within the math extension?
Maybe the relevant code is https://github.com/wikimedia/mediawiki-extensions-Math/blob/master/MathMLRdfBuilder.php#L33
$writer->say( $propertyValueNamespace, $propertyValueLName ) ->value( $mml, 'http://www.w3.org/1998/Math/MathML' );
Is there a vagrant role that creates an Wikidata Query Service for testing?
Can it be that the title is misleading?
You want the math to be rendered in the table and other?
This is the place where you could change the rendering:
@Jonas thank you. After your comment, that was very helpful for me, it turns out that the title is misleading;-)
And yes. Math should be rendered in that table.
For the implementation I would add
var DATATYPE_MATHML = 'http://www.w3.org/1998/Math/MathML';
extend the case statement with
case DATATYPE_MATHML: html = data; break;
Is it really that simple?
Thanks for your pull request, but this is just a mirror, please submit your patch here:
Just checkout the repo and open index.html that's it.
We have a test instance at wdqs-test.wikidata.org, where we could test things. It runs on Wikidata data so should be good for testing.
There's also role::wdqs role which allows to deploy in labs, but there are a bunch of manual steps - you have to check out WDQS deploy repo manually (scap doesn't work that well in labs IIRC) and then manually load data. Ping me if you need help with that, it's not hard but needs some manual steps now.
I've deployed latest master on wdqs-test, but it doesn't seem to produce any difference:
@Jonas, could you check what's going on?
Oh, cool. Looks like it's my browser that is missing math... I don't see it in Chrome, but Safari works just fine. Great then. Will be deployed on production next deployment window (Monday).