Hi,
Here's an idea somebody suggested to me.
I would like to propose a way for any visitor to opt-in to MathJax on the fly. (Oh, maybe I should add a disclaimer: I work for MathJax.)
This would be simply a button on pages with math that would switch MathJax on (and possibly off via a cookie).
I believe this has some advantages.
* All users can get better math rendering but are not forced to have it * Wikipedia would become accessible to all math-capable screen readers (I've heard complaints that user registration is not not very accessible). * Users get to vote with their feet -- usage data could indicate if MathJax rendering quality is worth it.
I think this idea would be relatively simple to implement. Since the math images already contain their own TeX code as alt-text, MathJax can replace the images on the fly.
Excuse my poor javascript skill, but something like the following
$('img.tex').wrap('<span class="MathJax_Preview" />'); // this will allow MathJax to replace the images with its rendering on the fly $('.MathJax_Preview').after(function() { tex = $(this).find('img').attr("alt"); //grab the TeX code return " <script type='math/tex'>" + tex + "</script>" ; //add the script behind the MathJax_preview TODO handle display style }); $.getScript(' https://c328740.ssl.cf1.rackcdn.com/mathjax/2.1-latest/MathJax.js?config=TeX...'); //run MathJax
should be an approximation.
Of course, this should really use Wikipedia's MathJax configuration file. A real solution also should handle displaystyle math -- I couldn't figure out how Wikipedia handles this in the images but the MathJax side would simply need <script type="math/tex; mode=display">.
I'd be very interested to hear what people think.
Best regards, Peter.
On 05/03/2013 01:13 AM, Peter Krautzberger wrote:
(I've heard complaints that user registration is not not very accessible).
Separate from your main suggestion, what issues are you aware of here?
We are aware of the CAPTCHA, of course. We would like to have a version for vision-impaired people (https://bugzilla.wikimedia.org/show_bug.cgi?id=4845).
In the meantime, WMF wikis should provide a mechanism to manually request an account. Many already do, and our new account signup form should facilitate this (see e.g. https://en.wikipedia.org/wiki/Special:UserLogin/signup?useNew=1).
Matt Flaschen
Peter Krautzberger wrote:
I would like to propose a way for any visitor to opt-in to MathJax on the fly.
Hi.
It wasn't clear from your e-mail whether you realize that on Wikimedia wikis (including Wikipedia), MathJax is already an opt-in option, albeit only for logged-in users, not for all visitors. If you visit Special:Preferences --> Math,[1] you can see the MathJax option toward the bottom of the screen.
This is controlled by the "Math" MediaWiki extension.[2]
MZMcBride
[1] https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering [2] https://www.mediawiki.org/wiki/Extension:Math
On 3 May 2013 08:13, Peter Krautzberger peter.krautzberger@mathjax.org wrote:
Hi,
Here's an idea somebody suggested to me.
I would like to propose a way for any visitor to opt-in to MathJax on the fly. (Oh, maybe I should add a disclaimer: I work for MathJax.)
This would be simply a button on pages with math that would switch MathJax on (and possibly off via a cookie).
What is the state of MathJax i18n currently? Before we show it to lots of users it should be translatable.
-Niklas
-- Niklas Laxström
On 05/03/2013 03:29 AM, Niklas Laxström wrote:
On 3 May 2013 08:13, Peter Krautzberger peter.krautzberger@mathjax.org wrote:
Hi,
Here's an idea somebody suggested to me.
I would like to propose a way for any visitor to opt-in to MathJax on the fly. (Oh, maybe I should add a disclaimer: I work for MathJax.)
This would be simply a button on pages with math that would switch MathJax on (and possibly off via a cookie).
What is the state of MathJax i18n currently? Before we show it to lots of users it should be translatable.
Hard-coded into minified JavaScript (not using ResourceLoader), unfortunately (https://bugzilla.wikimedia.org/show_bug.cgi?id=35038)
I think this is an interesting idea (it's a middle ground towards possibly changing the default), worth exploring, but it definitely needs some work. Filed at https://bugzilla.wikimedia.org/show_bug.cgi?id=48036
Note, there is already a bug about enabling it by default (https://bugzilla.wikimedia.org/show_bug.cgi?id=36496), which is a bigger change.
See also https://bugzilla.wikimedia.org/show_bug.cgi?id=35480 (a proposal to send down PNG and then immediately transform it to MathJax in supported browsers).
Matt Flaschen
I think it's a nice idea if to trigger such a suggestion. I would add something to it though. I'd add a timer that checks how long it takes to markup the page, and that when it detects that pages take extremely long to finish rendering with MathJax, automatically proposes to the user to 'switch back'.
That makes the whole experience a bit safer for people.
DJ
On Fri, May 3, 2013 at 11:17 AM, Matthew Flaschen mflaschen@wikimedia.orgwrote:
On 05/03/2013 03:29 AM, Niklas Laxström wrote:
On 3 May 2013 08:13, Peter Krautzberger peter.krautzberger@mathjax.org
wrote:
Hi,
Here's an idea somebody suggested to me.
I would like to propose a way for any visitor to opt-in to MathJax on
the
fly. (Oh, maybe I should add a disclaimer: I work for MathJax.)
This would be simply a button on pages with math that would switch
MathJax
on (and possibly off via a cookie).
What is the state of MathJax i18n currently? Before we show it to lots of users it should be translatable.
Hard-coded into minified JavaScript (not using ResourceLoader), unfortunately (https://bugzilla.wikimedia.org/show_bug.cgi?id=35038)
I think this is an interesting idea (it's a middle ground towards possibly changing the default), worth exploring, but it definitely needs some work. Filed at https://bugzilla.wikimedia.org/show_bug.cgi?id=48036
Note, there is already a bug about enabling it by default (https://bugzilla.wikimedia.org/show_bug.cgi?id=36496), which is a bigger change.
See also https://bugzilla.wikimedia.org/show_bug.cgi?id=35480 (a proposal to send down PNG and then immediately transform it to MathJax in supported browsers).
Matt Flaschen
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
I would like to see Server rendered png issues fixed before this. Simple images are better for various devices and browsers. But it will be better to allow users to force technology, if no other simple solutions possible.
On Friday 03 May 2013 12:59 PM, Niklas Laxström wrote:
What is the state of MathJax i18n currently? Before we show it to lots of users it should be translatable.
MathJax available in Math extension is not completely capable to handle non-latin scripts. ( See this bug we filed yesterday: https://bugzilla.wikimedia.org/show_bug.cgi?id=48032 )
-Niklas
-- Niklas Laxström
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Thanks for all the feedback!
Matthew -- yes, the CAPTCHA bug is what I had in mind. IIRC navigating to the MathJax option as a registered user was also complicated. Thanks for creating the bug to track this proposal.
MZMcBride -- yes, I'm aware of it. This idea is specifically for unregistered users
Niklas -- our upcoming release will have a full localization. Our beta came out today, see http://www.mathjax.org/mathjax-v2-2-beta-now-available/. We're hoping we get hosted on TranslateWiki team. Alternatively, we'll put something up on Transifex.
Derk-Jan -- good point. I think an on/off button would be very useful. But I'm not sure it's necessary to stop the rendering since the code I suggested will replace the images only by the rendered equation. So from a reader's perspective, there's no interruption. (Try the code as a bookmarklet to see what I mean.)
Praveenp -- not sure how the two issues are related. I've commented on the bug thread for some background on MathJax.
On Fri, May 3, 2013 at 8:13 AM, praveenp me.praveen@gmail.com wrote:
I would like to see Server rendered png issues fixed before this. Simple images are better for various devices and browsers. But it will be better to allow users to force technology, if no other simple solutions possible.
On Friday 03 May 2013 12:59 PM, Niklas Laxström wrote:
What is the state of MathJax i18n currently? Before we show it to lots of users it should be translatable.
MathJax available in Math extension is not completely capable to handle non-latin scripts. ( See this bug we filed yesterday: https://bugzilla.wikimedia.**org/show_bug.cgi?id=48032https://bugzilla.wikimedia.org/show_bug.cgi?id=48032)
-Niklas
-- Niklas Laxström
______________________________**_________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/**mailman/listinfo/wikitech-lhttps://lists.wikimedia.org/mailman/listinfo/wikitech-l
______________________________**_________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/**mailman/listinfo/wikitech-lhttps://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org