# WordPress.org

## SlickQuiz Quiz Answers Break w/ MathJax (6 posts)

1. rkieru
Member
Posted 1 year ago #

I am using SlickQuiz in conjunction with the plugin Simple MathJax to allow my users to quiz themselves on math problems and formulae.

I've noticed that any time I use LaTeX output (via MathJax) in my answers, SlickQuiz fails to note a correct answer being selected. It's always marked as incorrect. An example of LaTeX would be as follows:

$M_X(t) = e^{35t}$

2. jewlofthelotus
Member
Plugin Author

Posted 1 year ago #

@rkieru - Do you have a page with a broken quiz on it that I could look at?

3. rkieru
Member
Posted 1 year ago #

@jewelofthelotus - You can view the quiz at bit.ly/WAgM56. The correct answers SHOULD be C, C, C, B, A. We've double and triple-checked that the LaTeX formula aren't just screwed up on our end (ie. we put the 'right' answer in the incorrect box). The moment I take away the LaTeX it works just fine.

4. jewlofthelotus
Member
Plugin Author

Posted 1 year ago #

@rkieru - I see. So the quiz validates answers by comparing the value of the selected answer to the list of answers it stores hidden on the page. Because the LaText plugin takes what you put into the quiz and translates it to pretty math stuff, the comparison doesn't work.

There may be a better way for me to setup the answer validation, but for now, you unfortunately won't be able to use LaTex within the quiz. I will look into a solution and post back here when I have an update.

5. rkieru
Member
Posted 1 year ago #

As a band-aid would I be able to link to an image for each answer or would the code necessary to pull an image in cause issues?

6. jewlofthelotus
Member
Plugin Author

Posted 1 year ago #

@rkieru - Totally! You can put any HTML you like within the quiz fields, so an image tag shouldn't be a problem.

This topic has been closed to new replies.