I imported the tstat
exercise given in Zeileis et al. (2014) to Moodle using exams2moodle
from R/exams with default settings. But Moodle does not fully recognize the math equations written in both LaTeX and Rmd formats. Is there any way to fix this issue? The function exams2pdf
works fine with equations but exams2html
not.
Since R/exams 2.3-3 the default in exams2moodle()
is converter = "pandoc-mathjax"
which means that the text (in either Markdown or LaTeX) is converted to HTML but the mathematic equations are preserved in LaTeX. The rendering of the math equations is then intended to be done by the MathJax plugin - a Javascript plugin that has to be embedded in Moodle and can then run in any modern browser. In your Moodle installation this seems to be switched off and you have to enable it, see: https://docs.moodle.org/35/en/MathJax_filter
As an alternative you can use converter = "pandoc-mathml"
. Then the exercises are converted to HTML plus MathML for the mathematic equations. In that case no plugin/filter is needed but a browser that can render MathML. Firefox and Safari can do this - but Chrome/Chromium has no support for MathML.
For more details see the discussion at http://www.R-exams.org/tutorials/math/.