Installation

Corrupted images in IE

Re: Corrupted images in IE

by Davide Cervone -
Number of replies: 0
You mention that jsMath doesn't process some macros like \dfrac. These are part of the amsmath LaTeX package, and jsMath does handle those, but they are not loaded by default. It would be possible to request jsMath's AMSmath extension to be loaded for all problems, or to define the macros you are most interested in so that they autoload the AMSmath extension.

The first could be accomplished by editing the webwork2/htdocs/jsMath/jsMath-ww.js file and adding

    Setup: {
      UserEvent: {
        "onload": function () {jsMath.Extension.Require("AMSmath")}
      }
    },
after the line reading
    Font: {},
This would cause the AMSmath extension to be loaded for every problem for every class (but since the file should be cached by the browser, that is not such a big deal). I should add a variable in global.conf that gives an array of extensions to load automatically to make this easier for you.

To predefine \dfrac to autoload the AMSmath extension, add

    dfrac:       ['Extension','AMSmath'],
after the line
    boldsymbol:  ['Macro','{\\bf #1}',1],
This would define \dfrac so that it would load the AMSmath package only when \dfrac is actually used in the problem. Other macros can be added in the same fashion.

It would be possible to make these changes on a course-by-course, or even problem-by-problem basis, but it would take a little care.

Hope that helps.

Davide