Clipping of Fractions when generating MathML Multiple Choice Interval Notation questions

  • administrators

    Can you export the question and post it so I can see if I can replicate you issue?

  • Banned

    @jmtrik I've exported and attached the question.

    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.

  • administrators

    You should be able to drag a file into the editor window and it should then place a hyperlink to the file in the post. You may need to wait a few seconds if it is a large file. You could also try using or equivalent service and pasting a link here.

  • Banned

    Try: for the exported question.

  • administrators

    @EntilzaV Sorry. I can't get this url to work. Could you try again please?

  • Banned

  • The above URL doesn't work either I'm afraid.

    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.

  • Banned

    Yes, that's what I have defined in the equation editor. (-infinity, $ans1] and other randomly generated combinations of (-infinity, $wrongans), [$ans1, infinity), etc.

    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

  • Banned

    Okay, did some more work. I created a new question with the following algorthim:

    $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. 

  • administrators

    You can try using latex instead.

    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.

Log in to reply