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 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.
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
I just tried it with a bit different formulas, screenshot attached.
For me, the jsmath rendering has issues, e.g. the 0 at the integral
isn't aligned at the bottom, and the superscript numbers for the
powers are easier to read. So, just from my perspective, mathjax wins.
Maybe there are css settings interfering in your case? I don't know.
H
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
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 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.