Is there any way to change the behaviour of the mathml so that the fractions aren't clipped like this? Or is there a better way to create randomly generated interval notation questions?

]]>

Is there any way to change the behaviour of the mathml so that the fractions aren't clipped like this? Or is there a better way to create randomly generated interval notation questions?

]]>

$expr="sin(x)/x"; #exprD=maple("printf(MathML[ExportPresentation]($expr))");]]>

$ans1=#define algorithm for answer here; ansmathml=maple("printf(MathML[ExportPresentation]($ans1))");

originally the code in the question was simply ansmathml=mathml($ans1);

Both codes create a Math ML object. However in the case of both codes when $ans1 is a fraction like say 1/6, the fraction will not completely display in the multiple choice selections as the fraction is cropped at the top and bottom. (see example below)

Edit: I am unsure that the file is attached. I click the file upload tool, select the exported zip but nothing seems to indicate that the zip file is attached. Tried attaching non-zip file same result.

]]>If (−∞,$ans1] is written in the equation editor, then this renders as a MathML object whose size is determined by what is written. In other words, MathML does not realise $ans1 is actually representing a fraction.

The typical fix would be along the lines of setting $ansmathml as the multiple choice option, and defining $ansmathml=mathml("(-infinity,1/6]");

If you copy your algorithm code into a response I may be able to help further.

]]>The reason I have to do that, is because if I do as you suggest (and that's what I started with but didn't work) and have something like $ansmathml2=mathml ("(-infinity,$frac]");, Maple T.A. either interprets the square bracket as a round one or renders the square bracket as a round bracket. It also clips like so clipping issues part 2.jpg

]]>$ansmathml1 = mathml("(-infinity,1/6]");

$ansmathml2 = mathml ("(-infinity, 1/6)");

$ansmathml3 = mathml ("(1/6, infinity)");

$ansmathml4 = mathml ("[1/6, infinity)");

I figured out what caused the clipping, if I don't put the variable through the equation editor and just render it in the multiple choice field as the variable, I get

So I still have my issue with the square brackets being turned into round ones. However, the clipping issue has gone away.

If I tediously edit my multiple choice so that "(-infinity," is put through the equation editor but $ansmathml is not and then back to the equation editor for a second time to get "]" I get the fraction to appear if not perfectly, than without the clipping. See

It's not perfect, but at least it is now a lot more legible.

]]>In the algorithm section write

$ansmathml1 = "\left(-\infty, \dfrac{1}{6}\right]"; $ansmathml2 = "\left(-\infty, \dfrac{1}{6}\right)";

Then in the answer boxes put for example

\( $ansmathml1 \)

Here is the result.

]]>