MathJax (in Math extension) not loaded on http://en.m.wikipedia.org/
Closed, DeclinedPublic

Description

[I'm not sure if I should have reported this for "Wikipedia App" instead.]

MathJax is not loaded on http://en.m.wikipedia.org/ but the user settings are honored -- which means the text contains TeX code without rendering it.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=71787

bzimport added a project: Math.Via ConduitNov 22 2014, 1:25 AM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz45816.
Pkra created this task.Via LegacyMar 6 2013, 11:49 PM
Krinkle added a comment.Via ConduitMar 6 2013, 11:52 PM

MobileFrontend / RL-target overrides the load queue. Any more not screened by Mobile is considered non-existent.

MathJax is adding it to the page, but MobileFrontend/RL-target is skipping it when it comes to execution.

Please ask the mobile team to review MathJax and whitelist it for target mobile.

Pkra added a comment.Via ConduitMar 7 2013, 12:00 AM

Please ask the mobile team to review MathJax and whitelist it for target

mobile.

How do I contact the mobile team?

Jdlrobson added a comment.Via ConduitMar 7 2013, 12:31 AM

Is MathJax still being developed?
It should be possible to make MathJax work on mobile but it would require changes to the MathJax code base...

Looking at the source code here it currently doesn't make use of ResourceLoader (RL) but uses hooks which are not available on mobile.
http://people.cs.kuleuven.be/~dirk.nuyens/Extension_MathJax/MathJax.php.txt

My moving this to use RL it should be relatively easy to get it optimised and running on mobile...

MZMcBride added a comment.Via ConduitMar 7 2013, 12:33 AM

I don't see how this bug is invalid.

Pkra added a comment.Via ConduitMar 7 2013, 12:41 AM

Is MathJax still being developed?

Yes, very much so. (but see below)

It should be possible to make MathJax work on mobile but it would require changes to the MathJax code base...

Do you mean MathJax or the MediaWiki extension that integrates MathJax? I'm guessing the latter.

http://people.cs.kuleuven.be/~dirk.nuyens/Extension_MathJax/MathJax.php.txt

I think that's the wrong extension. The regular Math extension includes optional MathJax http://www.mediawiki.org/wiki/Extension:Math#MathJax

Not sure if that's related, but for the actual Android and iOS apps, you could also ship a copy of MathJax (slimming it down) to reduce network load and improve rendering speed.

brion added a comment.Via ConduitMar 7 2013, 6:52 PM

Yeah, we use the Math extension's support for MathJax, not the separate MathJax-specific extension.

IIRC, Math uses a ResouceLoader-loaded stub to bootstrap MathJax, which then loads its own minified code.

It *should* work to mark the bootstrap stub as mobile-friendly... but we'll want to test to make sure it works as expected. We should also measure how heavy the download is; between libraries and fonts it may be a bit heavyweight for mobile.

SalixAlba added a comment.Via ConduitJul 30 2013, 9:56 PM

Any progress on this? A user has just asked at http://en.wikipedia.org/wiki/Help_talk:Displaying_a_formula#No_MathJax_on_mobile.3F

If its not possible could it be made to switch to texvc mode when using a mobile?

fredw added a comment.Via ConduitSep 10 2013, 8:00 PM

(In reply to comment #7)

Any progress on this? A user has just asked at
http://en.wikipedia.org/wiki/Help_talk:
Displaying_a_formula#No_MathJax_on_mobile.3F

If its not possible could it be made to switch to texvc mode when using a
mobile?

I've done some work to make MathJax uses MediaWiki's resource loader, but I'll wait that MathJax 2.3 is released to finish it.

Here is a wmflabs instance that uses server-side TeX-to-MathML conversion and, for non-Gecko browsers, MathJax loaded via MediaWiki's ResourceLoader:
http://math-test2.instance-proxy.wmflabs.org/wiki/Fourier_series

Jdlrobson added a comment.Via ConduitSep 10 2013, 8:17 PM

one concern - will this JavaScript only be loaded by pages that use it? Also how much JavaScript would we be loading? We must remember that some users have very slow connections and we already send a fair chunk of code down the wire...

fredw added a comment.Via ConduitSep 10 2013, 8:27 PM

MathJax is only loaded by Wiki pages with <math> tags (and of course only when the MathJax mode is enabled). Also MathJax is split in several parts like TeX parser, HTML-CSS render etc and only the parts that are needed are loaded. However, it remains a big library and my experiments on an ipod with the page I just mentioned was that the rendering is very slow. The need of Web fonts make that even worse, especially when they are not cached by the system (bug 38751). The exact performance will have to be tried and studied carefully. A first step to test the water will be to make it an option for anonymous users (bug 48036).

(On the other hand, the native MathML of my Ipod's Safari in the page I mentioned I mentioned is fast)

brion added a comment.Via ConduitSep 10 2013, 8:30 PM

Yes, it should only get loaded on pages that use it.

It may be a fair amount of JS (and associated WebFonts), so it could be a bit expensive on mobile networks... we'll want to try it out and test, probably.

MathJax is still an opt-in option, so I'd recommend we get it working on mobile and evaluate its heaviness -- there's some possibilities we can investigate with server-side SVG rendering if it really comes to it.

Jdlrobson added a comment.Via ConduitSep 10 2013, 8:30 PM

worse, especially when they are not cached by the system (bug

38751).
The exact performance will have to be tried and studied carefully. A first
step
to test the water will be to make it an option for anonymous users (bug
48036).

(On the other hand, the native MathML of my Ipod's Safari in the page I
mentioned I mentioned is fast)

Yes but is this on a WiFi connection or a 2G connection? We should optimise for the latter...

fredw added a comment.Via ConduitSep 10 2013, 8:38 PM

(In reply to comment #12)

Yes but is this on a WiFi connection or a 2G connection? We should optimise
for
the latter...

I "tested" on a WiFi connection. Doing more server-side conversions (either MathML or SVG) is probably the way we want to go.

Pkra added a comment.Via ConduitSep 10 2013, 10:49 PM

IMHO, the obvious thing to do is for the mobile apps to *ship* a (slim) copy of MathJax to eliminate the connections issues at once. But in general, MathJax would be cached (like all resources) and could be pre-fetched on a faster connection.

bzimport added a comment.Via ConduitOct 20 2014, 6:45 AM

physik wrote:

as discussed in 71787

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.