Math symbols for quizzes

Math symbols for quizzes

by Fernando Merizalde -
Number of replies: 11

I want to add math symbols like subscript and superscript to my math formulas, so equations too. When I make a question it appear me correctly like 2but on the answer field it appears me li this 22 How can I solve that??? I´m using multiple choice question

Thanks for your answers

Average of ratings: -
In reply to Fernando Merizalde

Re: Math symbols for quizzes

by John Rodgers -
By far the best way (that I know of right now) is to enable the TEX filter (it may be enabled already) and enter your formula using LaTex. Enclose your formula in double dollars symbols \$\$ <formula> \$\$

$$2^2$$

and the filter will convert the symbol to an image. There are some rather spectacular things going on with drag math and other filters, but this is a currently functional standard.
In reply to Fernando Merizalde

Re: Math symbols for quizzes

by Marc Grober -
Fernando,
Question is a bit more complex than one might hope ;=}
How you trying to display the math symbols? Are you using HTML, Tex, asciimathml? There are some issues with some types of displays in answers as well as confusion as to whether one is speaking of the answer option the instructor creates and an answer field a student is using.

There has been quite a bit of work and discussion about extending tiny MCE and plugins to areas where they have not been seen before and ways to help students enter math notation in such form as can be assessed without manual grading. Lots to do and often quite a bit of confusion between what I call constructor vs display tools.

If you can offer some additional details that would be helpful.
In reply to Marc Grober

Re: Math symbols for quizzes

by Fernando Merizalde -

Hi Marc,

thanks for your help my trouble is that when I ry to put an math operation on the answer box of optional choice it doesnt allow m to put superscript for example I copy from word a formula like: (1-x)7 and it appears in this way (1-x)7 I need to find the way to the answer appear on the correct way; I dont know if Im using HTML or tex or asciimathml, I´m only introducing the text on my moodle platform fields. 

In reply to Fernando Merizalde

Re: Math symbols for quizzes

by Ian Wild -
Picture of Plugin developers
Hi Fernando,

I've just tested this in one of my Moodles... what you need to do is turn on a filter, e.g. TeX filter. If you enclose (1-x)^7 in double dollars in the answer box this still gets picked up by the TeX filter and converted into $$(1-x)^7$$.

Do you have a math filter turned on?

Cheers,

Ian.
In reply to Fernando Merizalde

Re: Math symbols for quizzes

by Marc Grober -
This is using html via the sup tag: x2
This is using tex $$x^2$$ , which places x^2 between double dollar signs
And in asciimathml <whine>which Moodle has yet to support though it would be easy enough to do this via theme....</whine> we would do `x^2`

So, my guess is you are using html if you are copying from <shudder> MS Word</shudder> and that the extra tags are being stripped (Moodle actually does a lot of that, mostly for security purposes. You can check this by copying the same text to a moodle web page and use the html source editor button <> to look at the html. Perhaps at some point we will have access to tiny MCE for quizzes and lessons.....

You can test to see if you have Tex running and use tex if you want, but html will likely have issues. There have been some problems with tex in some instances as well, which is one reason I have recommended using asciimathml with quizzes, but to do tex or asciimathml you will have to either turn the tex filter on and check its function using texdebug.php or install asciimathml and then write your text expression employing the appropriate syntax and tokens.


In reply to Marc Grober

Re: Math symbols for quizzes

by Fernando Merizalde -

Ok Im using Html I alredy proved if its, and I did this for questions field (x-1)<sup>7</sup> and it appears like (x-1)7 but on the answer field it appears like

(x-1)7 I need a formula for making (x-1)7 appears on the answer field.

In reply to Fernando Merizalde

Re: Math symbols for quizzes

by Mauno Korpelainen -

The only explanation I can quess is that some class in you theme might set vertical alignment of sup (and sub) to baseline - we had such a site wide bug in moodle.org some time ago caused by a css reset code http://tracker.moodle.org/browse/MDLSITE-681

For example classes .answer, .c1 or .text in theme css might do the job.

On my test sites TeX, AsciimathML and HTML work all well in Multiple Choice questions and answers. We had some discussions about drop down lists (IE won't show mathematical notations in drop down lists) but multiple choice answers seem to work fine. Is it possible to visit your site ( a demo course ) or see the source of that question / answer page?

Attachment sup.gif
In reply to Marc Grober

Re: Math symbols for quizzes

by Yulia I -
You need to turn on the Tex filter. So the expression should be posted as $$x^2$$. If you didn't know Tex symbols you can type your formulas in Mathtype and convert by using toggle to tex command.
In reply to Yulia I

Re: Math symbols for quizzes

by Bob Mathews -
"...you can type your formulas in Mathtype and convert by using toggle to tex command."

Good thought about using MathType -- not everyone knows TeX, but the "Toggle TeX" command is only available when using MathType in Word (except Word 2008). To use MathType in Moodle, follow the instructions in our article MathType works with Moodle.

Bob