#9774: Upgrade the notebook to use MathJax instead of jsMath
---------------------------+------------------------------------------------
Reporter: mpatel | Owner: jason, was
Type: enhancement | Status: needs_work
Priority: major | Milestone:
Component: notebook | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
---------------------------+------------------------------------------------
Changes (by rbeezer):
* cc: rkirov (added)
Comment:
Steps that will install `MathJax` with the new Flask notebook.
1. Install the Flask version of the notebook.
{{{
http://code.google.com/r/rkirov-flask/
}}}
2. Download v1.1 of `MathJax` as zip file (from bottom of page).
{{{
http://www.mathjax.org/download/
}}}
3. Unzip the MathJax distribution into[[BR]]
$SAGE_ROOT/devel/sagenb/sagenb/data[[BR]]
and[[BR]]
rename the new directory: {{{mathjax-MathJax-5a7e4d7}}} (or
whatever)[[BR]]
to be just the directory: {{{MathJax}}}
4. jsmath compatibility. Edit
{{{
$SAGE_ROOT/devel/sagenb/sagenb/data/MathJax/config/default.js
}}}
by adding "{{{jsMath2jax.js}}}" as the first entry of the "extensions"
list, so it becomes
{{{
extensions: ["jsMath2jax.js", "tex2jax.js"]
}}}
5. Edit
{{{
$SAGE_ROOT/devel/sagenb/sagenb/data/sage/html/notebook/base.html
}}}
and change
{{{
<script type="text/javascript"
src="/javascript/sage/jsmath.js"></script>
}}}
to
{{{
<script type="text/javascript"
src="/static/MathJax/MathJax.js?config=default"></script>
}}}
This will install `MathJax` and the notebook will use it. But the setup
is buggy, so needs work. I'm sure there is some configuration on the Sage
side and/or the `MathJax` side that will need changes.
* A mix of black and green symbols.
* Only renders on a reload - adding new TeX via TinyMCE returns with an
error about not finding fonts.
* Some stray tags are being rendered, or something.
Screenshots attached:
Double Integral:[[BR]]
http://wiki.math.toronto.edu/TorontoMathWiki/index.php/JsMath/MathJax_%28TeX_for_Web%29
{{{
$$ (2\pi h)^{-d}\iint_{\{H(x,\xi) <\tau\}} dx d\xi $$
}}}
Matrix:
{{{
$\begin{bmatrix}
x^2 & y^2\\
x^3 & \cos(z)
\end{bmatrix}$
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9774#comment:14>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.