Page MenuHomePhabricator

Introduce a parameter to set which method should be selectable in user preferences
Closed, ResolvedPublic

Description

It will be nice to have a parameter e.g. $wgMathRendering allowing to set which method to render formulas should be choosable in the user preferences. So far it is only possible to set a distinct method as default for users. However other choices are shown, even if they are eventually not set up.

Pragmatically this setting could default to

$wgMathRendering = array(

MW_MATH_PNG,
MW_MATH_SOURCE

);


Version: unspecified
Severity: enhancement

Details

Reference
bz57981

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:17 AM
bzimport added a project: Math.
bzimport set Reference to bz57981.
Kghbln created this task.Dec 4 2013, 2:59 PM

physik wrote:

There are the variables
$wgMathUseTexvc, $wgMathUseMathML, $wgMathJax
to adjust the available methods.
Does that solve the problem

Kghbln added a comment.Dec 4 2013, 3:52 PM

Unfortunately they do not or I really missed something. Let me put it in other words: What do I have to set if I do not want one or both of the standardly displayed options to be shown on "Special:Preferences", i.e. "Always render PNG" and/or "Leave it as TeX (for text browsers)"? The parameters mentioned allow to manipulate the choice of just these three extra options, not of all of them. Currently I am dirtily patching "Math.hooks.php" to achieve this. Thus reopening.

physik wrote:

You are right, you can not disable the plaintext mode.
Disabling the png mode is a feature of the next version that is currently reviewed.
https://gerrit.wikimedia.org/r/#/c/85801/
I agree with you that it would be preferred to replace those individual variables and make the $validModes variables MathRenderer::getRenderer global.
I'll put that to my todo list.

physik wrote:

I added the feature to Math2.0
https://gerrit.wikimedia.org/r/#/c/85801/

Change 109488 had a related patch set uploaded by Physikerwelt:
Introduce $wgMathValidModes to adjust the selectable math rendering modes in user preferences

https://gerrit.wikimedia.org/r/109488

Change 109488 abandoned by Physikerwelt:
Introduce $wgMathValidModes to adjust the selectable math rendering modes in user preferences

Reason:
restructure changes

https://gerrit.wikimedia.org/r/109488

Change 112327 had a related patch set uploaded by Physikerwelt:
Introduce $wgMathValidModes to adjust the selectable math rendering modes in user preferences

https://gerrit.wikimedia.org/r/112327

Change 112327 abandoned by Physikerwelt:
Introduce $wgMathValidModes to adjust the selectable math rendering modes in user preferences

Reason:
the concept of the math_2_0_0 branch did not work

the master branch keep on chaning while math_2_0_0 is not noticed

https://gerrit.wikimedia.org/r/112327

Change 110226 had a related patch set uploaded by Physikerwelt:
$wgMathValidModes and orthogonal MathJax enabler

https://gerrit.wikimedia.org/r/110226

Change 110226 merged by jenkins-bot:
$wgMathValidModes and orthogonal MathJax enabler

https://gerrit.wikimedia.org/r/110226

Kghbln added a comment.Sep 2 2014, 7:18 PM

Heiya physikerwelt, thanks a ton for implementing this. I just successfully tested this on a MW 1.23 though the way to enable this has changed since revision 110226. A bit irritating is that this uses a checkbox instead of of radiobuttion but this should be another bug report.