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
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
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
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
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.
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
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
Thanks for the feedback! I'll look into it.
Thanks,
Jason
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
Thanks,
Jason
Thanks. I've reproduced it and am looking into it.
Jason
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
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
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
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
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
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
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
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
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).
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
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
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.
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.
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
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
Oops. Looks like I messed up the reply.
CC: 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.
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
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
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.
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
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.
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
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
Thanks. I keep forgetting that Lion is full of bugs. Jobs' reality
distortion field is haunting me.
-- William
>
> Thanks,
>
> Jason