Page MenuHomePhabricator

MathJax mode does not respect content direction (aka "rtl")
Closed, DeclinedPublic

Description

in RTL wikis, when using MathJax, formulas are left-aligned.
with either TeX or PNG modes, the formulas are right-aligned on RTL wikis.

this causes completely different page rendering for users who render formulas with MathJax, vs. users who render Math as png (or TeX, for that matter).

peace.


Version: unspecified
Severity: normal

Details

Reference
bz52619

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:58 AM
bzimport added projects: Math, I18n.
bzimport set Reference to bz52619.
bzimport added a subscriber: Unknown Object (MLST).

(In reply to comment #0)

in RTL wikis, when using MathJax, formulas are left-aligned.

Is there a page / testcase where this problem can be seen?

see

https://he.wikipedia.org/w/index.php?title=%D7%95%D7%99%D7%A7%D7%99%D7%A4%D7%93%D7%99%D7%94:%D7%93%D7%9C%D7%A4%D7%A7_%D7%99%D7%99%D7%A2%D7%95%D7%A5&oldid=14476142

at the bottom of the page (next to the "bug reported in bugzilla" template). note that the formula is right-aligned if you choose mathjx in preferences, and right-aligned when you choose "png" display for math formulas.

peace.

MathJax currently does not yet support RTL. In our defense, neither does any browser (for MathML).

For future reference: http://docs.mathjax.org/en/latest/mathml.html#supported-mathml-commands. For context: MathJax converts TeX to MathML internally and then renders MathML.

(In reply to comment #3)

MathJax currently does not yet support RTL. In our defense, neither does any
browser (for MathML).

i do not think this is relevant to the bug. MW software (or rather, the math extension) packages the mathJax part inside a div with style="text-align: left". when content direction is RTL, we should change this to "right".

afaik, this should not affect the mathjax appearance - i think that this wrapper div is not part of matjax.

peace - ~~~~

Created attachment 13266
screenshot

That seems to work correctly for me on the Math Extension master branch.

Attached:

rtl.png (336×1 px, 37 KB)

(In reply to comment #6)

Created attachment 13266 [details]
screenshot

That seems to work correctly for me on the Math Extension master branch.

was this tested on an RTL wiki?

peace.

Attached:

rtl.png (336×1 px, 37 KB)

physik wrote:

The screenshot indicates that it works.