Page MenuHomePhabricator

Extension:Math requires mathoid to do mathml, and requires restbase to find mathoid
Open, Needs TriagePublic

Description

Extension:Math requires mathoid to do mathml, and requires restbase to find mathoid. This is horrible dependency soup and makes the extension harder to set up than VE, which is stupid, because VE is actually doing something complicated, and this really, really isn't.

$wgMathFullRestbaseURL = false is ignored; it still looks for restbase and does not use $wgMathMathMLUrl.

Event Timeline

There is also no meaningful documentation.

Physikerwelt added a subscriber: Physikerwelt.

$wgMathMathMLUrl is not used at all if restbase is available.

$wgMathMathMLUrl is not used at all full stop, because the extension assumes restbase is available and then errors out if it isn't, as far as I can tell.

Put it this way: no matter what I do, it looks for restbase and then explodes when it can't find it. This sounds like a bug.

$wgMathMathMLUrl is not used at all full stop, because the extension assumes restbase is available and then errors out if it isn't, as far as I can tell.

That's not entirely true. If you have enabled experimental input types such as AsciMathML or MathML as input $wgMathMathMLUrl is used to render the experimental input types.

What are you trying to do?

What are you trying to do?

Use mathml.

Look, I don't know what's going on or what's supposed to be going on, but all I want is to be able to use the 'MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools)' thing without mw falling on its face. The documentation on how to set this up is lacking or perhaps even missing. From what I've gathered from what's there, this now requires mathoid. From the errors complaining about not being able to find restbase (even though I've set up mathoid and it by itself works, and I've also set up VE and tried doing some of the same things it said to do for parsoid for mathoid in the hopes they would work (they didn't)), I can gather that it apparently needs restbase.

I'm not even going to go into the problem of why the hell the built-in functionality that was working perfectly fine before was removed. I just want it to work at all.

https://www.mediawiki.org/wiki/Extension:Math suggests

// Set MathML as default rendering option;
$wgDefaultUserOptions['math'] = 'mathml';
$wgMathFullRestbaseURL= 'https://api.formulasearchengine.com/';

You have to place this settings AFTER loading the math extension.

Did you do that? Nothing else should be neccary.

If that works but you can't set up a private restbase instance, it's a restbase problem. We need to figure that out in order to help you solving your poblem.

Okay, tried that and it doesn't throw exceptions anymore. Doesn't actually do anything else, either, though.

I ran into the same issue today: mathoid server works, math extension does not: "Math extension can not find Restbase URL." Having read this topic, I still have a question. Can math extension work with mathoid directly without the need to use RESTBase? (Installing RESTBase to get math rendering work feels like a total overkill.) Available documentation is silent on this topic.

I can specify

$wgMathFullRestbaseURL= 'https://api.formulasearchengine.com/';

but then that external service is used and I want to configure math rendering locally.

I have tried to install RESTBase yesterday to be able to use mathoid. That was not straightforward. While getting RESTBase to work took not much effort, I gave up on getting Mathoid to work through RESTbase. There is very little documentation in this regard, and all I could go by were example configuration files. So, for smaller wiki projects it would be nice if Mathoid could be used from the Math extension directly, without the need for RESTBase. If that is not in the plans, maybe we should update Math and Mathoid pages on MediaWiki to warn prospective users that getting Mathoid to work requires RESTBase and that configuring the latter is not easy.

@Dubovik Yes that's definitely planned. See T155201 for details.