Escaping braces in LaTeX for use in GIFT uploads

Escaping braces in LaTeX for use in GIFT uploads

by C Csar -
Number of replies: 6

I've been having a trouble uploading quiz questions in GIFT format that contain LaTeX. I've established that the issue is that curly braces in the LaTeX are being parsed as starting the answer. For example,

$$\frac{1}{2x}$$ ... {=answer ~wrong answer}

would be interpreted as being a short answer question and part of the LaTeX code would be stripped, leaving $$\frac{2x}$$ etc. Is there a way to escape LaTeX's braces? Alternatively, is there another question format that will let me write different types of questions in a text file that doesn't use braces?

Average of ratings: -
In reply to C Csar

Re: Escaping braces in LaTeX for use in GIFT uploads

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

\frac\{yes\}\{like this\}

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: Escaping braces in LaTeX for use in GIFT uploads

by C Csar -

That feels like it should have been obvious (aside from worrying that LaTeX would puke all over it). Thanks.

In reply to C Csar

Re: Escaping braces in LaTeX for use in GIFT uploads

by M Tiwari -

Hey can you tell me if you are using any plugin for LaTeX. Coz mine is still not converting.

In reply to M Tiwari

Re: Escaping braces in LaTeX for use in GIFT uploads

by lilian li -

Neither can I.

I tried the followings:

\frac\{yes\}\{like this\}

\\frac\{yes\}\{like this\}

and

\( \frac{yes}{like this} \) , which I copied from formula editor in moodle.



In reply to lilian li

Re: Escaping braces in LaTeX for use in GIFT uploads

by lilian li -
Aha, It works  here ?!  


Yet, it didn't work in moodle preview !

In reply to lilian li

Re: Escaping braces in LaTeX for use in GIFT uploads

by lilian li -

I got it! you need a blank or a new line after a formula!