Mathjax needs review

75 views
Skip to first unread message

jason...@creativetrax.com

unread,
Jan 13, 2012, 5:44:21 PM1/13/12
to sage-notebook, sage-devel
Hi everyone,

I've put up a patch to Sage and a SageNB spkg for review which upgrades
the notebook from jsMath to MathJax. If you are interested in reviewing
this, please follow the directions in the description of
http://trac.sagemath.org/sage_trac/ticket/9774. Basically, you need to
apply two patches and install one spkg.

The spkg uses the almost-reviewed new flask sage notebook. If the
mathjax changes pass positive review, then we can merge the changes into
the master flask sagenb tree and make an official sagenb spkg release.

Thanks,

Jason

William Stein

unread,
Jan 13, 2012, 6:04:06 PM1/13/12
to sage-n...@googlegroups.com, sage-devel

Are you planning to install mathjax on any *.sagenb.org?

> Thanks,
>
> Jason

Jason Grout

unread,
Jan 13, 2012, 6:48:45 PM1/13/12
to sage-...@googlegroups.com
On 1/13/12 5:04 PM, William Stein wrote:
>
> On Jan 13, 2012 2:44 PM, <jason...@creativetrax.com
> Are you planning to install mathjax on any *.sagenb.org <http://sagenb.org>?

I'd love to, if we have enough disk space for another sage install on
that disk. Right now, we have around 4.4G free, so it would take up
about a quarter to half of the space left for all of the sagenb.org
servers. That seems a little tight to me.

Thanks,

Jason

Jason Grout

unread,
Jan 14, 2012, 1:11:55 AM1/14/12
to sage-n...@googlegroups.com, William Stein, sage-devel
On 1/13/12 5:04 PM, William Stein wrote:
> Are you planning to install mathjax on any *.sagenb.org <http://sagenb.org>?

I cleared off some space and installed this as well as the jmol update
at #11503 on test.sagenb.org.

So please, everyone, try mathjax and the new jmol out at
test.sagenb.org. Please note that a lot of the user-visible changes to
jmol are coming in a later ticket; #11503 is mainly about upgrading jmol
and making it an independent spkg.

Thanks,

Jason

Jason Grout

unread,
Jan 14, 2012, 1:13:33 AM1/14/12
to sage-n...@googlegroups.com, William Stein, sage-devel

Oh, and test.sagenb.org is also running 5.0.beta1, which includes the
python 2.7 upgrade and many other things, so feel free to test those as
well.

Thanks,

Jason


P Purkayastha

unread,
Jan 14, 2012, 2:17:36 AM1/14/12
to sage-n...@googlegroups.com, William Stein, sage-devel


On Saturday, January 14, 2012 2:11:55 PM UTC+8, Jason Grout wrote:
On 1/13/12 5:04 PM, William Stein wrote:
> Are you planning to install mathjax on any *.sagenb.org <http://sagenb.org>?

I cleared off some space and installed this as well as the jmol update
at #11503 on test.sagenb.org.


There is one glitch in mathjax with "<" and ">" signs.  See http://test.sagenb.org/home/pub/19/
I have tested it in firefox-8 and in opera-11.60 (Gentoo, 64bits). Jmol is working.

Julien Puydt

unread,
Jan 14, 2012, 3:51:33 AM1/14/12
to sage-...@googlegroups.com
Le 14/01/2012 00:48, Jason Grout a �crit :

> I'd love to, if we have enough disk space for another sage install on
> that disk. Right now, we have around 4.4G free, so it would take up
> about a quarter to half of the space left for all of the sagenb.org
> servers. That seems a little tight to me.

A good solution would be if different sage installs could somehow share
some parts... I don't exactly see how that would work, but it's just an
idea.

Snark on #sagemath

Dima Pasechnik

unread,
Jan 14, 2012, 7:41:58 AM1/14/12
to sage-...@googlegroups.com, sage-n...@googlegroups.com
looks good (chrome on MacOSX). 
What about making jmol request permission to run without explicit page reloading?
Is it a bug or a feature?


Dima Pasechnik

unread,
Jan 14, 2012, 7:50:31 AM1/14/12
to sage-n...@googlegroups.com, William Stein, sage-devel
I am not sure if this is Sage's bug. Similar things happen on mathoverflow.net...
On the other hand it might just mean that the mathjax settings need to adjusted.
Or could it be tinymce?

Jason Grout

unread,
Jan 14, 2012, 9:37:17 AM1/14/12
to sage-...@googlegroups.com

Are you talking about Chrome asking for permission to run a java applet?
I think that's a Chrome thing, and not something in our control.

Thanks,

Jason

Jason Grout

unread,
Jan 14, 2012, 9:37:55 AM1/14/12
to sage-...@googlegroups.com
On 1/14/12 1:17 AM, P Purkayastha wrote:
>
>
> On Saturday, January 14, 2012 2:11:55 PM UTC+8, Jason Grout wrote:
>
> On 1/13/12 5:04 PM, William Stein wrote:
> > Are you planning to install mathjax on any *.sagenb.org
> <http://sagenb.org> <http://sagenb.org>?

>
> I cleared off some space and installed this as well as the jmol update
> at #11503 on test.sagenb.org <http://test.sagenb.org>.

>
>
> There is one glitch in mathjax with "<" and ">" signs. See
> http://test.sagenb.org/home/pub/19/
> I have tested it in firefox-8 and in opera-11.60 (Gentoo, 64bits). Jmol
> is working.


Thanks for the feedback! I'll look into it.

Thanks,

Jason

Jason Grout

unread,
Jan 14, 2012, 9:39:26 AM1/14/12
to sage-...@googlegroups.com

They already do. The problem is that the disk is about 57 G, and the
*data* for sagenb.org alone takes 30G. There are only two sage installs
(one standard, one test), and each of those takes 3.7G. Data for the
other sage notebooks takes up another sizeable chunk.

Thanks,

Jason

Dima Pasechnik

unread,
Jan 14, 2012, 9:51:00 AM1/14/12
to sage-...@googlegroups.com
It's not a Chrome thing; 
I see the same behaviour on Safari. E.g. if I do in a cell:
c=cube(); c.show()
then I don't see any output at all.
I need to reload the webpage in order for it to show the cube.


 

Thanks,

Jason

Jason Grout

unread,
Jan 14, 2012, 9:59:53 AM1/14/12
to sage-...@googlegroups.com

Thanks. I've reproduced it and am looking into it.

Jason

Jason Grout

unread,
Jan 14, 2012, 10:29:55 AM1/14/12
to sage-...@googlegroups.com

Okay, this should be fixed now. Can you check it? You might need to
clear your javascript cache for the change to take effect.

This was commit
https://github.com/jasongrout/sagenb/commit/d4b053c481bb2b4832a6a7563cc1c76318b284a5

Thanks,

Jason

Jason Grout

unread,
Jan 14, 2012, 1:19:39 PM1/14/12
to sage-n...@googlegroups.com, P Purkayastha, William Stein, sage-devel
On 1/14/12 1:17 AM, P Purkayastha wrote:
>
>
> On Saturday, January 14, 2012 2:11:55 PM UTC+8, Jason Grout wrote:
>
> On 1/13/12 5:04 PM, William Stein wrote:
> > Are you planning to install mathjax on any *.sagenb.org
> <http://sagenb.org> <http://sagenb.org>?

>
> I cleared off some space and installed this as well as the jmol update
> at #11503 on test.sagenb.org <http://test.sagenb.org>.

>
>
> There is one glitch in mathjax with "<" and ">" signs. See
> http://test.sagenb.org/home/pub/19/
> I have tested it in firefox-8 and in opera-11.60 (Gentoo, 64bits). Jmol
> is working.


I've fixed the problem and updated test.sagenb.org.

I've fixed it by getting rid of the math_parse function and conditional
typesetting we were doing. We've configured MathJax to make the
math_parse function obsolete, and it's inconsistent to typeset only
conditionally. See
https://github.com/jasongrout/sagenb/commit/6a4eed4d6baf78cd19fe634144c727843d1af08d
and
https://github.com/jasongrout/sagenb/commit/8d6b0a071c13850cea983faaa6b910be498cd0ae

Thanks for the feedback; please test the fixes.

Jason

William Stein

unread,
Jan 14, 2012, 2:49:39 PM1/14/12
to Jason Grout, sage-n...@googlegroups.com, P Purkayastha, sage-devel
On Sat, Jan 14, 2012 at 10:19 AM, Jason Grout
<jason...@creativetrax.com> wrote:
> Thanks for the feedback; please test the fixes.

I really hate to write this, but it's important. Evidently, I have
never seriously looked at MathJax before just now, I guess, because my
first reaction is that Mathjax looks like "crap" compared to jsmath,
at least with Chrome 16.0.912.75 on OS X 10.7. The very first thing I
tried was "show(2/3* x^(3/2 + pi))". On sagenb.org with jsmath it
looks amazing -- just like pdflatex output. On test.sagenb.org it
looks horrible to my eye -- definitely nowhere close to tex or even
jsmath.

Even the example in the upper right of http://www.mathjax.org/ (at
that site) looks bad to me (which is also in the screenshot).

In Safari things look equally bad. In Firefox they look... a bit better.

Do I have to install special fonts? What am I doing wrong? If this
is really what MathJax looks like, I definitely don't want to switch
to MathJax.

-- William

Screen Shot 2012-01-14 at 11.40.00 AM.png

Jason Grout

unread,
Jan 14, 2012, 3:17:47 PM1/14/12
to sage-...@googlegroups.com


The issue is that it is probably using your browser's STIX fonts rather
than standard Computer Modern TeX fonts. I just pushed a change to
test.sagenb.org that lets you select which font to use. Can you
right-click on a MathJax expression, click Settings, then Font
Preference, and select a TeX font and see if that solves your problem?

Thanks,

Jason

Nathan Dunfield

unread,
Jan 14, 2012, 3:36:05 PM1/14/12
to sage-devel

> The very first thing I tried was "show(2/3* x^(3/2 + pi))".  On sagenb.org with jsmath it
> looks amazing -- just like pdflatex output.  On test.sagenb.org it
> looks horrible to my eye -- definitely nowhere close to tex or even
> jsmath.

I don't know if this helps, but the visual horribleness is coming from
the fact that everything in the MathJax examples are getting
italicized (or maybe slanted) and the stuff that should be in italics
(like variable names) is getting over italicized. For instance, look
at the numerals in the factions of the first example. Actually,
looking more closely, I think what's happening is that it's using a
slanted font for everything instead of the italic font when
appropriate (compare the variable "x" in the two examples; in MathJax
I think it's a slanted "x" instead of an italic one. Unfortunately, I
don't have any idea what's causing it, though, since everything looks
good to me on Chrome running on OS X Leopard.

Nathan

William Stein

unread,
Jan 14, 2012, 3:37:51 PM1/14/12
to sage-...@googlegroups.com

The first two "Tex font" options look good. The third (image fonts)
just gives a big red error, and now I'm *stuck* using that option with
evidently no way to get out of it, since I can't get the menu anymore
-- all I get is "[Math Processing Error]" in red. :-(

Can we please change the default to "Tex fonts", or does that only
work if one has something special installed?

It's a little sad to me that the only way to get the menu is right
click. This is somewhat non-mac friendly (and downright hostile to
tablets and phones), as we saw often with jmol at the JMM booth where
we were constantly tripped up trying to access the jmol menu. The
old "jsmath" square button in the bottom right was better. Is there
an option for something like that?

William

>
>
> Thanks,
>
> Jason
>
> --
> To post to this group, send an email to sage-...@googlegroups.com
> To unsubscribe from this group, send an email to
> sage-devel+...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org

--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

Jason Grout

unread,
Jan 14, 2012, 3:48:51 PM1/14/12
to sage-...@googlegroups.com

Yeah, I'm stuck there too :(. I specified in the configuration that we
didn't have image fonts, but apparently that doesn't remove the menu
option. Also, it would be nice if you could get the menu by clicking on
the red error message.

For now, I've put back the png image fonts so we can get back the menu.
This adds about 118M to the install, and is only necessary for very
old browsers (and for those of us that get stuck, apparently).

>
> Can we please change the default to "Tex fonts", or does that only
> work if one has something special installed?
>

TeX Web fonts will work probably, but require a download (fully
automatic, though; you don't do a thing). This is probably cached too.


> It's a little sad to me that the only way to get the menu is right
> click. This is somewhat non-mac friendly (and downright hostile to
> tablets and phones), as we saw often with jmol at the JMM booth where
> we were constantly tripped up trying to access the jmol menu. The
> old "jsmath" square button in the bottom right was better. Is there
> an option for something like that?

I think it would be easy enough for us to change this via javascript on
our own menu. Would you like a small little "MathJax" square button at
the bottom?

Thanks,

Jason

Jason Grout

unread,
Jan 14, 2012, 5:20:36 PM1/14/12
to sage-...@googlegroups.com
On 1/14/12 1:49 PM, William Stein wrote:
> Do I have to install special fonts? What am I doing wrong? If this
> is really what MathJax looks like, I definitely don't want to switch
> to MathJax.

Over on sage-notebook, I forwarded a message from Davide which tells us
what is happening. I quote below:

----

The issue with the slantiness of fonts that William is having is due to
a bug in OS X Lion, which ships with STIX fonts, but the Lion version of
WebKit doesn't display them properly. See

https://github.com/mathjax/MathJax/issues/178
and
https://github.com/mathjax/MathJax/issues/152

for more details. It looks like the STIX 1.1beta fonts fix the problem,
and I will work around it for v2.0 of MathJax, but for now, either
disabling the STIX fonts via FontBook, or configuring MathJax not to use
them (as described above) will avoid it.

Thanks for letting me know about Sage's inclusion of MathJax. Let me
know if there are other issues.

----

The hope is that the next update of Lion will have the bugfix. Davide
also showed us how to disable the STIX fonts, which I will do now (which
means the user's browser will automatically download TeX fonts).


Davide also pointed out that STIX fonts have a lot more symbols, so that
would be a reason to use them. We'll revisit the issue when the Lion
bug is fixed or MathJax 2.0 is released (which also works around the issue).

Thanks,

Jason

Jason Grout

unread,
Jan 14, 2012, 5:37:34 PM1/14/12
to sage-n...@googlegroups.com, William Stein, P Purkayastha, sage-devel
On 1/14/12 1:49 PM, William Stein wrote:
> Do I have to install special fonts? What am I doing wrong? If this
> is really what MathJax looks like, I definitely don't want to switch
> to MathJax.


I pushed a fix to test.sagenb.org. The default now should be to use TeX
local fonts, then TeX web fonts. When Lion is fixed, or MathJax 2.0 is
released, we can re-enable STIX fonts and look at them then.

Davide also pointed out how I incorrectly turned off image fonts. I
fixed that, so selecting image fonts should now just fall back to
unicode if you don't have the image fonts installed, instead of giving
an error.

Thanks,

Jason

P Purkayastha

unread,
Jan 14, 2012, 6:24:13 PM1/14/12
to Jason Grout, sage-n...@googlegroups.com, William Stein, sage-devel

Thanks a lot for the fix. This works here now on firefox. It also works
on opera as long as I am using the worksheet. The _published_ worksheet
on the other hand only half-works in opera. See the attached screenshot
for the glitch. Can anyone else confirm if the published worksheets work
in $browser in $OS?

FYI, my opera is 11.60 on Gentoo linux 64bits. I upgraded firefox today
and it is at version 9.0.1 (published worksheet works well in firefox).

opera-top-worksheet-bottom-published.png

Jason Grout

unread,
Jan 14, 2012, 11:11:31 PM1/14/12
to P Purkayastha, sage-n...@googlegroups.com, William Stein, sage-devel
On 1/14/12 5:24 PM, P Purkayastha wrote:
> Thanks a lot for the fix. This works here now on firefox. It also works
> on opera as long as I am using the worksheet. The _published_ worksheet
> on the other hand only half-works in opera. See the attached screenshot
> for the glitch. Can anyone else confirm if the published worksheets work
> in $browser in $OS?

It works fine for me (OSX 10.6.8) in FF 9.0.1, Chrome (current), and
Safari 5.1.2. I fixed one bug in the javascript code which seemed to
help Opera, but Opera still has problems displaying equations inside
text cells. It's weird; I can get it to display inside text cells on my
local machine when I switch rendering engines by right-clicking on a
MathJax expression. Sometimes, I can also get it to display by manually
running the MathJax processing command again. But I can't get it
consistently display typeset text cells (local or on test.sagenb.org).

Thanks,

Jason

William Stein

unread,
Jan 15, 2012, 1:36:08 AM1/15/12
to sage-...@googlegroups.com

Yes, I would like that, since it would be less likely to confuse
existing users, and it works pretty well to have it. It's easy to
find, and no right clicking is needed.

Another feature of jsmath is that if you view an equation you can
*left* click on it to see the underlying LaTeX source code. This is
something that I think people like and use now. With MathJax, you
have to instead *right* click, then select "Show Source". This is
much harder to do on a mac. In fact, I can't even get right click to
work in some cases with MathJax formulas (sometimes it works,
sometimes it doesn't, somewhat like what happens with Jmol).

In summary, I don't like "right click menus" at all in any context,
because I care about the poor user, and I don't like frustrating
clunky UI's. What do you think? Does this seem reasonable to you?
I'm basing this on my own experience and watching lots of people
trying to use Sage.

-- William

Dima Pasechnik

unread,
Jan 15, 2012, 1:48:15 AM1/15/12
to sage-...@googlegroups.com


On Saturday, 14 January 2012 23:29:55 UTC+8, jason wrote:
On 1/14/12 8:59 AM, Jason Grout wrote:
> On 1/14/12 8:51 AM, Dima Pasechnik wrote:
>>
>>
>> On Saturday, 14 January 2012 22:37:17 UTC+8, jason wrote:
>>
>> On 1/14/12 6:41 AM, Dima Pasechnik wrote:
>> > looks good (chrome on MacOSX).
>> > What about making jmol request permission to run without explicit
>> page
>> > reloading?
>> > Is it a bug or a feature?
>>
>> Are you talking about Chrome asking for permission to run a java
>> applet?
>> I think that's a Chrome thing, and not something in our control.
>>
>> It's not a Chrome thing;
>> I see the same behaviour on Safari. E.g. if I do in a cell:
>> c=cube(); c.show()
>> then I don't see any output at all.
>> I need to reload the webpage in order for it to show the cube.
>
> Thanks. I've reproduced it and am looking into it.

Okay, this should be fixed now.  Can you check it?  You might need to
clear your javascript cache for the change to take effect.

Thanks, it works now (on MacOSX 10.6.8, Chrome, Safari, and Opera 11.61)

P Purkayastha

unread,
Jan 15, 2012, 3:22:42 AM1/15/12
to Jason Grout, sage-n...@googlegroups.com, William Stein, sage-devel

Looking at the MathJax code (v1.1a downloaded from Mathjax website), it
seems that MathJax uses MathML to render stuff in firefox and IE but
HTML+CSS in opera and others. I looked at the MathML output in opera
from these two pages (which test MathML):

http://xml-maiden.com/userjs/mathml/examples/torture.xhtml
http://xml-maiden.com/userjs/mathml/examples/stress.xhtml

and it "looks" fine to me. I don't know the rationale behind not using
MathML with opera. I have a suspicion that this is done because opera
probably can not handle all forms of math properly.

P Purkayastha

unread,
Jan 15, 2012, 3:27:59 AM1/15/12
to sage-...@googlegroups.com
From MathJax documentation (I see it in the source code of v1.1a), it appears that you need to Ctrl-Click in order to get that menu. This Ctrl-Click is only for Macs, whereas it is right click for the other OSs.

Also, from reading the source, I see that MathJax has config variables and in the Accessibility.js the behavior of double-click is set to zoom via one of the config variables. I suppose it should be possible to set the behavior of double-click so that it pops up the MathJax menu on all OSs. The default behavior is probably empty/undefined.

Jason Grout

unread,
Jan 16, 2012, 11:11:12 AM1/16/12
to sage-...@googlegroups.com
On 1/15/12 2:27 AM, P Purkayastha wrote:
> From MathJax documentation (I see it in the source code of v1.1a), it
> appears that you need to Ctrl-Click in order to get that menu. This
> Ctrl-Click is only for Macs, whereas it is right click for the other OSs.

On a mac, ctrl-click is the same as a right-click. That's how I
typically do a right click.

>
> Also, from reading the source, I see that MathJax has config variables
> and in the Accessibility.js the behavior of double-click is set to zoom
> via one of the config variables. I suppose it should be possible to set
> the behavior of double-click so that it pops up the MathJax menu on all
> OSs. The default behavior is probably empty/undefined.

Do you want to take my mathjax fork on github and experiment with that?

https://github.com/jasongrout/sagenb/tree/mathjax

Thanks,

Jason

Jason Grout

unread,
Jan 16, 2012, 11:12:59 AM1/16/12
to sage-...@googlegroups.com

Davide said Opera's MathML is too buggy to make default. We force
HTML+CSS in all browsers (because even Firefox has lots of MathML bugs,
apparently), but give the user the option to switch to MathML if they
really want. Davide does the same on the official MathJax website.

Thanks,

Jason

P Purkayastha

unread,
Jan 16, 2012, 1:39:29 PM1/16/12
to Jason Grout, sage-devel
On 01/17/2012 02:34 AM, Jason Grout wrote:
> On 1/16/12 12:28 PM, P Purkayastha wrote:

>>
>>
>> On Tuesday, January 17, 2012 12:11:12 AM UTC+8, jason wrote:
>>
>> Do you want to take my mathjax fork on github and experiment with that?
>>
>> https://github.com/jasongrout/sagenb/tree/mathjax
>>
>> Thanks,
>>
>> Jason
>>
>> I can look into it but only after about 3 weeks. I am really pressed for
>> time at present. If this can wait for some time, then I will be glad to
>> look into getting double click to work.
>
>
> Thanks!
>
> William: do you consider this a blocker for mathjax?
>
> Thanks,
>
> Jason
>

Oops. Looks like I messed up the reply.
CC: sage-devel

Dima Pasechnik

unread,
Jan 16, 2012, 11:14:41 PM1/16/12
to sage-n...@googlegroups.com, sage-devel


On Sunday, 15 January 2012 06:37:34 UTC+8, Jason Grout wrote:
On 1/14/12 1:49 PM, William Stein wrote:
> Do I have to install special fonts?  What am I doing wrong?   If this
> is really what MathJax looks like, I definitely don't want to switch
> to MathJax.


I pushed a fix to test.sagenb.org.  The default now should be to use TeX
local fonts, then TeX web fonts.  When Lion is fixed, or MathJax 2.0 is
released, we can re-enable STIX fonts and look at them then.

AFAIK this is only configurable at the server side.
IMHO it must be at least client-side tweakable: e.g., it's totally unclear
to me how TeX local fonts are looked for on the client side.

For me with MacOSX and TeXLive installed at some not so standard location I never see
local fonts used.
How does one deal with this?

Thanks,
Dima

Jason Grout

unread,
Jan 16, 2012, 11:31:47 PM1/16/12
to sage-...@googlegroups.com
On 1/16/12 10:14 PM, Dima Pasechnik wrote:
>
>
> On Sunday, 15 January 2012 06:37:34 UTC+8, Jason Grout wrote:
>
> On 1/14/12 1:49 PM, William Stein wrote:
> > Do I have to install special fonts? What am I doing wrong? If this
> > is really what MathJax looks like, I definitely don't want to switch
> > to MathJax.
>
>
> I pushed a fix to test.sagenb.org <http://test.sagenb.org>. The

> default now should be to use TeX
> local fonts, then TeX web fonts. When Lion is fixed, or MathJax 2.0 is
> released, we can re-enable STIX fonts and look at them then.
>
> AFAIK this is only configurable at the server side.
> IMHO it must be at least client-side tweakable: e.g., it's totally unclear
> to me how TeX local fonts are looked for on the client side.
>
> For me with MacOSX and TeXLive installed at some not so standard
> location I never see
> local fonts used.
> How does one deal with this?

I assume the "TeX local fonts" it is looking for are the otf fonts that
come with MathJax. If they are not installed, then it downloads them
off the web. I don't think it's looking for TeXLive fonts, though I
might be mistaken.

Thanks,

Jason

William Stein

unread,
Jan 19, 2012, 12:37:00 PM1/19/12
to sage-...@googlegroups.com
Hi,

Regarding jsmath and mathjax... It seems like we have the issues
worked out for the Sage notebook. Yeah, and thanks to Jason, David,
etc., for their persistence.

I was just browsing mathoverflow, e.g., [1], and noticed that suddenly
their math typesetting is very, very painful to look at. It turns out
they recently switched from jsmath to mathjax. Even trying all
settings, I couldn't get their mathjax to look usable (I think they
have the same Stix fonts on OS X 10.7 bug we saw earlier). They do
have a button in the right to "(Re)process math with jsMath.", which
works fine. If we do have further reported issues, we might want to
consider supporting both temporarily...


[1] http://mathoverflow.net/questions/82809/torsion-points-of-cm-elliptic-curves

John H Palmieri

unread,
Jan 19, 2012, 1:09:17 PM1/19/12
to sage-...@googlegroups.com


On Thursday, January 19, 2012 9:37:00 AM UTC-8, William wrote:
Hi,

Regarding jsmath and mathjax...   It seems like we have the issues
worked out for the Sage notebook.  Yeah, and thanks to Jason, David,
etc., for their persistence.

I was just browsing mathoverflow, e.g., [1], and noticed that suddenly
their math typesetting is very, very painful to look at.  It turns out
they recently switched from jsmath to mathjax.  


I'm not sure about that.  I see one page (http://meta.mathoverflow.net/discussion/637/report-bugs-with-latex-mathjax-rendering-here/#Item_0) which says that they switched in August 2010.  Have you changed operating systems or browsers recently?  That could explain the difference in appearance.  For example, mathoverflow doesn't look good with Chrome OS X Lion, but to me it looks fine in Firefox or OS X 10.6. 

--
John

Jason Grout

unread,
Jan 19, 2012, 1:14:40 PM1/19/12
to sage-...@googlegroups.com
On 1/19/12 11:37 AM, William Stein wrote:
> Hi,
>
> Regarding jsmath and mathjax... It seems like we have the issues
> worked out for the Sage notebook. Yeah, and thanks to Jason, David,
> etc., for their persistence.

At what point should we merge it?

I hesitate to merge it into #11080, since we've already been delaying
that ticket for a long time as we added more things. It would be great
if reviewing could finish for #11080 and its dependencies. Then we
could incorporate mathjax into sagenb 0.9.1, which could probably also
be reviewed in time for sage 5.0.


>
> I was just browsing mathoverflow, e.g., [1], and noticed that suddenly
> their math typesetting is very, very painful to look at. It turns out
> they recently switched from jsmath to mathjax. Even trying all
> settings, I couldn't get their mathjax to look usable (I think they
> have the same Stix fonts on OS X 10.7 bug we saw earlier). They do
> have a button in the right to "(Re)process math with jsMath.", which
> works fine.

There are discussions about including the workaround Davide posted in
the next maintenance release of Mathjax, so hopefully soon it will be
worked around.


> If we do have further reported issues, we might want to
> consider supporting both temporarily...

I think supporting both would not be doable for me timewise (if you want
passing doctests, etc.). If someone else wanted to make those changes
to support both, though, go right ahead.

Thanks,

Jason

William Stein

unread,
Jan 19, 2012, 1:32:59 PM1/19/12
to sage-...@googlegroups.com
On Thu, Jan 19, 2012 at 10:14 AM, Jason Grout
<jason...@creativetrax.com> wrote:
> On 1/19/12 11:37 AM, William Stein wrote:
>>
>> Hi,
>>
>> Regarding jsmath and mathjax...   It seems like we have the issues
>> worked out for the Sage notebook.  Yeah, and thanks to Jason, David,
>> etc., for their persistence.
>
>
> At what point should we merge it?

It's up to you, I think, since you're really taking charge with the
next notebook release. I'm fine with waiting, since there do seem to
be some stability issues with it soon. The main feature is that one
should get nice typesetting without having to install the jsmath
fonts, and that is really valuable.

>> I was just browsing mathoverflow, e.g., [1], and noticed that suddenly
>> their math typesetting is very, very painful to look at.  It turns out
>> they recently switched from jsmath to mathjax.  Even trying all
>> settings, I couldn't get their mathjax to look usable (I think they
>> have the same Stix fonts on OS X 10.7 bug we saw earlier).  They do
>> have a button in the right to "(Re)process math with jsMath.", which
>> works fine.
>
>
> There are discussions about including the workaround Davide posted in the
> next maintenance release of Mathjax, so hopefully soon it will be worked
> around.
>
>
>
>> If we do have further reported issues, we might want to
>> consider supporting both temporarily...
>
>
> I think supporting both would not be doable for me timewise (if you want
> passing doctests, etc.).  If someone else wanted to make those changes to
> support both, though, go right ahead.

Good point. We should just switch rather than supporting both.

William Stein

unread,
Jan 19, 2012, 1:34:39 PM1/19/12
to sage-...@googlegroups.com
On Thu, Jan 19, 2012 at 10:09 AM, John H Palmieri
<jhpalm...@gmail.com> wrote:
>
>
> On Thursday, January 19, 2012 9:37:00 AM UTC-8, William wrote:
>>
>> Hi,
>>
>> Regarding jsmath and mathjax...   It seems like we have the issues
>> worked out for the Sage notebook.  Yeah, and thanks to Jason, David,
>> etc., for their persistence.
>>
>> I was just browsing mathoverflow, e.g., [1], and noticed that suddenly
>> their math typesetting is very, very painful to look at.  It turns out
>> they recently switched from jsmath to mathjax.
>
>
> I'm not sure about that.  I see one page
> (http://meta.mathoverflow.net/discussion/637/report-bugs-with-latex-mathjax-rendering-here/#Item_0)
> which says that they switched in August 2010.  Have you changed operating
> systems or browsers recently?

Actually, I used to read mathoverflow a lot in 2010, and have only
read it less since then.... and I did switch to OS X Lion fairly
recently (which exposes that font bug in mathjax).

>   That could explain the difference in
> appearance.  For example, mathoverflow doesn't look good with Chrome OS X
> Lion, but to me it looks fine in Firefox or OS X 10.6.

Very good point.

>
> --
> John

Jason Grout

unread,
Jan 19, 2012, 1:41:10 PM1/19/12
to sage-...@googlegroups.com
On 1/19/12 12:34 PM, William Stein wrote:
> (which exposes that font bug in mathjax).

Just to be clear, since your comment could be read two ways, my
understanding is the bug is in Lion, not in mathjax.

Thanks,

Jason


William Stein

unread,
Jan 19, 2012, 1:44:26 PM1/19/12
to sage-...@googlegroups.com

Thanks. I keep forgetting that Lion is full of bugs. Jobs' reality
distortion field is haunting me.


-- William

>
> Thanks,
>
> Jason

Reply all
Reply to author
Forward
0 new messages