Skip to content
This repository has been archived by the owner on Jun 18, 2020. It is now read-only.

Commit

Permalink
Use Mathjax's jsMath2jax extension to provide backwards compatibility…
Browse files Browse the repository at this point in the history
… with div/spans that have "math" class

Some worksheets have div/spans that delimit math, in the jsMath style, in the html annotations.  Those stopped working when we upgraded to MathJax.  For example, Rob Beezer's worksheets converted from his book had this issue.
  • Loading branch information
jasongrout committed Aug 24, 2012
1 parent 2bc16ba commit 6105159
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions sagenb/data/sage/js/mathjax_sage.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$'],['\\(','\\)']],
processEscapes: true,
ignoreClass: 'cell_input_print', // "input cells" in published worksheets
// Need jsMath2jax so that worksheets with div/span class "math" elements still render correctly
// This is important for backwards compatibility (notably Rob Beezer's books)
extensions: ["jsMath2jax.js"],
tex2jax: {
inlineMath: [['$','$'],['\\(','\\)']],
processEscapes: true,
// "cell_input_print" because those are input cells in published worksheets
// "math" so that the tex2jax plugin leaves the spans/divs with class math alone
// (since jsMath2jax will take care of it); if we don't, then tex2jax and jsMath2jax conflict.
// See https://groups.google.com/forum/?fromgroups=#!topic/mathjax-users/qzWdxiQvNrw
ignoreClass: 'cell_input_print|math'
},

styles: {
Expand Down

0 comments on commit 6105159

Please sign in to comment.