Cloze type doesn't show TeX code correctly

Cloze type doesn't show TeX code correctly

by Roberto Catanuto -
Number of replies: 3

Hi, I've inserted this code into a cloze question:

{3:MULTICHOICE_VS:=$\frac{1}{b(1-b)}$#Right ~ $\frac{1}{(1-b)} $#Wrong ~ $\frac{b}{(1-b)}$#Wrong}.

Unfortunately it is rendered as it is, and the TeX code is not rendered next to each radio button.

I've tried everything, do you have any ideas ?

I attach a picture to understand the problem.

Thank you very much

Average of ratings: -
In reply to Roberto Catanuto

Re: Cloze type doesn't show TeX code correctly

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers

If you are using Moodle MathJax filter, then

            {3:MULTICHOICE_VS:=\(\frac{1\}{b(1-b)\}\)#Right~ \(\frac{1\}{(1-b)\} \)#Wrong ~ \(\frac{b\}{(1-b)\}\)#Wrong}.\( \)
    
should work. Right braces must be escaped inside cloze syntax. Placing an empty expression on the same line, tricks the filtter into processing the responses.

In reply to Daniel Thies

Re: Cloze type doesn't show TeX code correctly

by Roberto Catanuto -
Sorry for the trivial question: how do I know if I'm using MathJax filter ?
Thanks
In reply to Daniel Thies

Re: Cloze type doesn't show TeX code correctly

by Roberto Catanuto -
Anyway, I just tried it and it doesn't work. It keeps showing me the simple txt version of the question, and it doesn't render the TeX correctly.