LMSouq
moodle-core Open

Alignment of \hat symbols in for questions generated by exams2moodle

AL
Alex Michael
1 month ago
3 views
Problem Description
I'm generating Moodle cloze exercises using the `exams2moodle` function from R's `exams` package. For students using the Chromebooks or the Chrome browser on Mac, the \hat LaTeX symbol doesn't appear to align properly over letters. See how the \hat in $\hat{p}$ blends with the question mark in Part 1 below. [![The issue][1]][1] Some relevant info: - This doesn't appear to be an issue for those using other browsers, and isn't an issue for those using the Windows version of Chrome (just the Mac version of Chrome and Chromebooks). To fix this I've tried: - I understand that Mathjax is now the default LaTeX renderer (for questions created using `exams2moodle`), but I tried using `converter = "pandoc-mathjax"` in the `exams2moodle` function call to ensure the LaTeX was rendered by Mathjax rather than MathML (which Chrome used to not support). - I'm presuming the Mathjax Moodle plugin is installed and active as most of the LaTeX is displayed properly https://stackoverflow.com/questions/62777874/moodle-does-not-recognize-math-equations/62785999. A (close to) MWE of the question code generating the issue is below: ```` ```{r gen data, echo=FALSE, results='hide'} H0pct=sample(8:14,1) H0p=H0pct/100 n=rpois(1,747) x=rpois(1,102) phat=x/n ``` Question =========== The proportion of left-handed people is the NZ population is known to be $`r H0pct`\%$, or $`r H0p`$. Using the survey data from previous STAT110 students, we find that $x = `r x`$ are left-handed from $n = `r n`$ students. **Part 1:** What is $\hat{p}$? Ensure your answer is accurate to 4 DP. ##ANSWER1## Meta-information =================== extype: cloze exclozetype: num exsolution: `r phat` extol: 0.0001 exshuffle: TRUE extitle: phat issue MWE exsection: Section 6: Non-continuous data/Binomial Distribution/Hypothesis test for a proportion/phat issue MWE ```` Any suggested next steps to take in solving this from here are much appreciated! [1]: https://i.sstatic.net/oTdO2HaA.png

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base