diff --git a/static/js/mathjax-MathJax-c9db6ac/unpacked/jax/input/AsciiMath/jax.js b/static/js/mathjax-MathJax-c9db6ac/unpacked/jax/input/AsciiMath/jax.js index c44136566c..2d0d89efe1 100644 --- a/static/js/mathjax-MathJax-c9db6ac/unpacked/jax/input/AsciiMath/jax.js +++ b/static/js/mathjax-MathJax-c9db6ac/unpacked/jax/input/AsciiMath/jax.js @@ -450,8 +450,9 @@ var AMsymbols = [ {input:"QQ", tag:"mo", output:"\u211A", tex:null, ttype:CONST}, {input:"RR", tag:"mo", output:"\u211D", tex:null, ttype:CONST}, {input:"ZZ", tag:"mo", output:"\u2124", tex:null, ttype:CONST}, -{input:"f", tag:"mi", output:"f", tex:null, ttype:UNARY, func:true}, -{input:"g", tag:"mi", output:"g", tex:null, ttype:UNARY, func:true}, +// not for edX (ichuang jun12) +//{input:"f", tag:"mi", output:"f", tex:null, ttype:UNARY, func:true}, +//{input:"g", tag:"mi", output:"g", tex:null, ttype:UNARY, func:true}, //standard functions {input:"lim", tag:"mo", output:"lim", tex:null, ttype:UNDEROVER}, diff --git a/templates/mathjax_include.html b/templates/mathjax_include.html index 7298c681ef..273efa4fa9 100644 --- a/templates/mathjax_include.html +++ b/templates/mathjax_include.html @@ -79,12 +79,10 @@ function DoUpdateMath(inputId) { } - <%block name="headextra"/> ## - - + \ No newline at end of file diff --git a/templates/problem.js b/templates/problem.js index a8f2f999a6..6dfca68d12 100644 --- a/templates/problem.js +++ b/templates/problem.js @@ -2,31 +2,27 @@ function ${ id }_content_updated() { MathJax.Hub.Queue(["Typeset",MathJax.Hub]); update_schematics(); - // dynamic math display: add to jaxset for automatic rendering +// for (var key in codemirror_set) { +// codemirror_set[key].refresh(); +// } + + $('#check_${ id }').unbind('click').click(function() { + $("input.schematic").each(function(index,element){ element.schematic.update_value(); }); + $(".CodeMirror").each(function(index,element){ if (element.CodeMirror.save) element.CodeMirror.save(); }); + + // dynamic math display: generate MathML on click $.each($("[id^=input_${ id }_]"), function(index,value){ theid = value.id.replace("input_",""); // ID of the response if (document.getElementById("display_" + theid)){ MathJax.Hub.queue.Push(function () { math = MathJax.Hub.getAllJax("display_" + theid)[0]; if (math){ - jaxset[theid] = math; - math.Text(document.getElementById(value.id).defaultValue); - x = document.getElementById("input_" + theid + "_dynamath"); UpdateMathML(math,theid); } }); }; }); - - $('#check_${ id }').unbind('click').click(function() { - $("input.schematic").each(function(index,element){ element.schematic.update_value(); }); - $(".CodeMirror").each(function(index,element){ if (element.CodeMirror.save) element.CodeMirror.save(); }); - -// for (var key in codemirror_set) { -// codemirror_set[key].refresh(); -// } - var submit_data={}; $.each($("[id^=input_${ id }_]"), function(index,value){ if (value.type==="checkbox"){ diff --git a/templates/textinput_dynamath.html b/templates/textinput_dynamath.html index 12021fe692..c50658f713 100644 --- a/templates/textinput_dynamath.html +++ b/templates/textinput_dynamath.html @@ -2,7 +2,7 @@ ### version of textline.html which does dynammic math ###
-
+
`{::}` - +
## ## javascript for dynamic math: add this math element to the MathJax rendering queue ## also adds to global jaxset js array ## - - + % if msg:
${msg|n}