MathJax advocacy

82 views
Skip to first unread message

Victor Ivrii

unread,
Feb 29, 2012, 8:51:28 AM2/29/12
to mathja...@googlegroups.com
While many websites began to use MathJax, two key player are missing

1) Wikipedia. While it is rather easy to hook up MJ to mediawiki,
Wikipedia has not adopted MJ. " Recommended for modern browsers" is
not MJ

* Always render PNG
* HTML if very simple or else PNG
* HTML if possible or else PNG
* Leave it as TeX (for text browsers)
* Recommended for modern browsers
* MathML if possible (experimental)

2) arXiv (for abstracts and titles). I thought they had a good reason
as many abstracts on their pages would return errors as they are
copy-paste from preprints themselves—without packages and macro
definitions. However with noErrors extension it would not be a case.
In the past tried to persuade arXiv maintainers to adapt MJ and I
think now its is the best time to do it again.


Victor

leat...@jsu.edu

unread,
Feb 29, 2012, 10:45:47 AM2/29/12
to mathja...@googlegroups.com
For Wikipedia, I found the following:

http://en.wikipedia.org/wiki/User:Nageh/mathJax

So it *is* possible to force Wikipedia to use MathJax over its usual PNG-based rendering.  It takes a bit of work, because you have to convince Wikipedia's internals to turn off the TeX processing so that MathJax still has something to work with.

On the other hand, arXiv is a different matter.  I, too, would very much like to see them start using MathJax for its abstracts, but it seems that it will take significant work to convince them, because they have their internal system which they know works for their purposes, even if it has all of the usual drawbacks of image-based rendering.  Getting organizations and publishers working with MathJax will help put some pressure on arXiv.  I know that some of the people at Cornell (which hosts arXiv) are already using MathJax for other purposes (like Project Euclid) -- see this link:

http://projecteuclid.org/DPubS?Service=UI&version=1.0&verb=Display&handle=euclid&page=about&aboutArea=publishers&aboutPage=about_mathjaxPublisher

So maybe it is just a matter of time.

Victor Ivrii

unread,
Feb 29, 2012, 11:12:32 AM2/29/12
to mathja...@googlegroups.com
On Wed, Feb 29, 2012 at 10:45 AM, <leat...@jsu.edu> wrote:
> For Wikipedia, I found the following:
>
> http://en.wikipedia.org/wiki/User:Nageh/mathJax
>
> So it *is* possible to force Wikipedia to use MathJax over its usual
> PNG-based rendering.  It takes a bit of work, because you have to convince
> Wikipedia's internals to turn off the TeX processing so that MathJax still
> has something to work with.

Well, it means that the author can post unmolested TeX (actually one
does not even need even to use TeX output, simply do not put <math>
</math> around!) but ***only*** readers who added MJ to their skin
will be able to have it rendered. Not good enough!

>
> On the other hand, arXiv is a different matter.  I, too, would very much
> like to see them start using MathJax for its abstracts, but it seems that it
> will take significant work to convince them, because they have their
> internal system which they know works for their purposes, even if it has all
> of the usual drawbacks of image-based rendering.

???? They do not use any system: I have seen NO bract rendered in any way.

> Getting organizations and
> publishers working with MathJax will help put some pressure on arXiv.  I
> know that some of the people at Cornell (which hosts arXiv) are already
> using MathJax for other purposes (like Project Euclid) -- see this link:
>
> http://projecteuclid.org/DPubS?Service=UI&version=1.0&verb=Display&handle=euclid&page=about&aboutArea=publishers&aboutPage=about_mathjaxPublisher
>
> So maybe it is just a matter of time.
>
>

Victor

--
========================
Victor Ivrii, Professor, Department of Mathematics, University of Toronto
http://www.math.toronto.edu/ivrii

Davide P. Cervone

unread,
Feb 29, 2012, 11:47:43 AM2/29/12
to mathja...@googlegroups.com
I agree with you that both of these would benefit from MathJax.

For (1) see https://bugzilla.wikimedia.org/show_bug.cgi?id=31406

For (2), you can use a user script to get typesetting for your own
viewing of the abstracts. Here is one such GreaseMonkey script:

// ==UserScript==
// @name MathJax in arXiv
// @namespace http://www.mathjax.org/
// @description Insert MathJax into pages containing MathML
// @include http://arxiv.org/*
// ==/UserScript==
// */

if ((window.unsafeWindow == null ? window : unsafeWindow).MathJax ==
null) {
//
// Load MathJax and have it process the page
//
var script, head = document.getElementsByTagName("head")[0];
script = document.createElement("script");
script.type = "text/x-mathjax-config";
script.text = "MathJax.Hub.Config({tex2jax:{inlineMath:[['$','$'],
['\\\\(','\\\\)']]}})";
head.appendChild(script);
script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full
";
head.appendChild(script);
}

This will cause TeX in any arXiv page to be typeset by MathJax. Of
course it would be nice if they handled it themselves, but your your
own use, you don't have to be stuck with raw TeX.

Davide

Peter Krautzberger

unread,
Feb 29, 2012, 12:30:27 PM2/29/12
to mathja...@googlegroups.com
Victor,

I would like to add that your suggestion to convince arXiv and wikipedia to use MathJax does not fall on deaf ears. 

Quite the opposite. 

This is on our agenda, but both arXiv and wikipedia are large projects and it will take time.

Regards,
Peter.

leat...@jsu.edu

unread,
Feb 29, 2012, 12:31:04 PM2/29/12
to mathja...@googlegroups.com
>  but ***only*** readers who added MJ to their skin
> will be able to  have it rendered. Not good enough!

I never said it was a *good* solution, just that it is possible.  You're right, requiring readers to install the skin to see MJ in Wikipedia is not good practice.


> ???? They do not use any system: I have seen NO bract rendered in any way.

Here is what the arXiv help pages say about using TeX in titles:

"Omit useless TeX directives like \bf or extra $'s - titles are meant to be human readable, e.g. $N\!=\!2$ should simply be N = 2."

So herein lies the crux of the problem:  for legacy purposes, we can't even assume that TeX expressions in titles and abstracts have $'s around them.  As Davide points out, there are scripts (similar to the skinning for Wikipedia) that can typeset things in arXiv (Davide gave a script for MJ, all I had seen before used image-based rendering), but they need the $'s in order to find the TeX.  Asking the arXiv people to go back and insert $'s into old titles and abstracts just won't work -- there are way to many.  What we need to try to do is talk them into a new practice for incoming articles -- actually *do* use $'s so that MJ can typeset the math.  As I said, I think it is just a matter of time, and a bit of outside pressure.

Victor Ivrii

unread,
Feb 29, 2012, 12:37:18 PM2/29/12
to mathja...@googlegroups.com
On Wed, Feb 29, 2012 at 12:31 PM, <leat...@jsu.edu> wrote:
>>  but ***only*** readers who added MJ to their skin
>> will be able to  have it rendered. Not good enough!
>
> I never said it was a *good* solution, just that it is possible.  You're
> right, requiring readers to install the skin to see MJ in Wikipedia is not
> good practice.
>
>
>> ???? They do not use any system: I have seen NO bract rendered in any way.
>
> Here is what the arXiv help pages say about using TeX in titles:
>
> "Omit useless TeX directives like \bf or extra $'s - titles are meant to be
> human readable, e.g. $N\!=\!2$ should simply be N = 2."

I have seen tons of violations of this—and I should confess I am guilty as well


>
> So herein lies the crux of the problem:  for legacy purposes, we can't even
> assume that TeX expressions in titles and abstracts have $'s around them.
> As Davide points out, there are scripts (similar to the skinning for
> Wikipedia) that can typeset things in arXiv (Davide gave a script for MJ,
> all I had seen before used image-based rendering), but they need the $'s in
> order to find the TeX.  Asking the arXiv people to go back and insert $'s
> into old titles and abstracts just won't work -- there are way to many.
> What we need to try to do is talk them into a new practice for incoming
> articles -- actually *do* use $'s so that MJ can typeset the math.  As I
> said, I think it is just a matter of time, and a bit of outside pressure.
>

Yes, I never thought that arXiv people go and do this, but they may
just make for the authors possible to edit abstracts easily and then
*some* authors will do it

Brion Vibber

unread,
Feb 29, 2012, 1:31:53 PM2/29/12
to mathja...@googlegroups.com
On Wed, Feb 29, 2012 at 9:31 AM, <leat...@jsu.edu> wrote:
>  but ***only*** readers who added MJ to their skin
> will be able to  have it rendered. Not good enough!

I never said it was a *good* solution, just that it is possible.  You're right, requiring readers to install the skin to see MJ in Wikipedia is not good practice.

We're planning to integrate MathJax more solidly in; things sometimes move slowly on Wikipedia as we have a lot of articles and don't want to break things unexpectedly. :)

Now that MathJax 2.0 is out, it's probably time to continue work on this; probably aiming for our next major code update in a few months for wide release.

Issues with printing were one concern I had with testing MathJax on Wikipedia earlier; the rumor that printing is more reliable with SVG output intrigues me!

-- brion vibber (brion @ pobox.com / brion @ wikimedia.org)

Davide P. Cervone

unread,
Feb 29, 2012, 1:40:52 PM2/29/12
to mathja...@googlegroups.com
> We're planning to integrate MathJax more solidly in; things
> sometimes move slowly on Wikipedia as we have a lot of articles and
> don't want to break things unexpectedly. :)

I would be happy to help resolve any issues that you still have.
Having read some of the forum discussions about it (like the one I
cited), I think there are definitely thing that MathJax can do to
avoid some of the issues. I'd also be willing to work on a custom
texvc compatibility configuration to help reduce the number of
problems. Also in v2.0 there are better hooks for learning about
equations that don't parse properly, and those can be used to help
locate the trouble spots for you.

> Now that MathJax 2.0 is out, it's probably time to continue work on
> this; probably aiming for our next major code update in a few months
> for wide release.

I agree.

> Issues with printing were one concern I had with testing MathJax on
> Wikipedia earlier; the rumor that printing is more reliable with SVG
> output intrigues me!

There are three issues that this should address:

1) Firefox has trouble printing web-based fonts in some version
(haven't checked their recent ones), and that should not be an issue
for SVG (but it affects both HTML-CSS and NativeMML output).

2) The rescaling needed to go from screen resolution to print
resolution sometimes causes the space reserved for the equations to
not be quite right in the printed version (I've seen this in Safari
and Chrome), and that should not be the case for SVG.

3) Opera appears to have real problems printing MathJax HTML-CSS
output (it gets completely messed up), but prints SVG output fine.

There may be other advantages as well, but those are the ones I know
about.

Davide

Phillip Lord

unread,
Mar 1, 2012, 6:58:44 AM3/1/12
to mathja...@googlegroups.com
Victor Ivrii <viv...@gmail.com> writes:

> 2) arXiv (for abstracts and titles). I thought they had a good reason
> as many abstracts on their pages would return errors as they are
> copy-paste from preprints themselves—without packages and macro
> definitions. However with noErrors extension it would not be a case.
> In the past tried to persuade arXiv maintainers to adapt MJ and I
> think now its is the best time to do it again.

This is an interesting idea. Their metadata already stores titles with
latex math markup. I've recently added arxiv to "Kcite" which is my
referencing tool

http://www.russet.org.uk/blog/2012/02/kcite-spreads-its-wings/

The example given on that page works nicely, but some of my references
come out like so...


Kubo, Yuimaru, A. O. Sboychakov, Franco Nori, Y. Takahide, S. Ueda, I.
Tanaka, A. T. M. N. Islam, and Y. Takano. 2011. Macroscopic quantum
tunneling and phase diffusion in a La$_{2-x}$Sr$_x$CuO$_4$ intrinsic
Josephson junction stack. arXiv (December 30).
http://arxiv.org/abs/1201.0104.

which is ugly. I haven't got this working yet, although I don't think it
should be hard (I just need to force mathjax to reload AFTER the
bibliography has been generated).

The point is, their metadata is already close to mathjax.

Phil

Reply all
Reply to author
Forward
0 new messages