mitodl / mitx-grading-library

The MITx Grading Library, a python grading library for edX
https://edge.edx.org/courses/course-v1:MITx+grading-library+examples/
BSD 3-Clause "New" or "Revised" License
14 stars 9 forks source link

Implement MathJax renderer definitions #57

Closed jolyonb closed 6 years ago

jolyonb commented 6 years ago

Ok, so I was too excited. And I needed it for the QM course I'm working on ;-)

The big piece here is the MJxPrep.js file that goes in the static folder. It hooks into the MathJax library to teach AsciiMath how to render a bunch of functions. Some functions are too complicated for a simple function definition and require a preprocessor (also implemented). Documentation has been updated to point out when these definitions are needed, as well as how to use them. The example course has been updated to reflect it. Pay particular attention to the factorial function, which now behaves really beautifully! Other functions also behave as functions, and don't get incorrectly separated when you divide by them.

I've implemented fixes for all of the functions in our function list that weren't working correctly.

Version number is updated to 1.1.1.

Feedback welcome!

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 2c17afcb754397edf58c80b9aae005899853f022 on asciimath into 3d0824d3dbe78225b5403c96a7e217e24e2e7cc9 on master.

jolyonb commented 6 years ago

Ok, I've updated all the documentation to point out that this only works for textline, fixed conj, updated the example course, and I even added a CSS selector to the refresh from the library. Let me know if you find anything else!