The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December. Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
As a math teacher, I have been making a lot of formula quizzes and recently decided to add some fractional components and formula quizzes does not like it at all.
For instance, while [x]/2 =5 works just fine, if I go into the equation editor and create the fraction with [x] as the numerator and 2 as the denominator = 5, there are no options for me to change x (and yes, I understand mathematically, I wouldn't want to change x as x is unknown, not variable here, but I digress....). However, if I edit the LaTex myself (for which I believe it is \frac{[x]}{2}=5, then it gives me the option to change x; HOWEVER, when my students click on the quiz question, it literally does NOT replace the x with the value of x, it stays as an "x" in brackets!
Any help would be lovely!!
Thank you.
Solved! Go to Solution.
Don't use the equation editor to create the image, but enter the LaTeX directly into the text of the question, surrounded by the LaTeX delimiters. Those are \ ( and \ ) but without the space after the \. The space I put in is to keep the Community software from recognizing it as LaTeX and formatting it (and hiding the delimiters).
For example, this question will give the type of output you're looking for.
Solve \(\frac{x}{[a]}=[b]\).
You could use \dfrac if you want a full sized fraction.
The thing with manually putting in LaTeX rather than using the equation editor is that it will not show in the text of the question until you're previewing the quiz.
A much more difficult (in my opinion) way to get what you want requires the use of MathML. This requires you editing the HTML of the page to insert the MathML code, but it will show up as soon as you update the question.
<p>Solve <math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac><mi>x</mi><mn>[a]</mn></mfrac><mo>=</mo><mn>[b]</mn></math>.</p>
Here is the visual difference between the two.
While editing the question the LaTeX shows.
Quiz edit mode
While previewing (or taking) the quiz, they look the same.
Preview mode
Historically, there had been problems with using MathML with certain browsers. I think most of those have been worked out, but I haven't checked recently.
There are several benefits to the LaTeX approach that make it my go-to method.
There are sites that will convert LaTeX to MathML for you. I'm not endorsing it, but the first one Google came up with was temml.org. They added a bunch of extra stuff to the code so it's not as simple as what Canvas gave me. This is because it interpreted the [ and ] used to denote a variable as math operators. That would completely break what you're trying to do.
That means that you should put a number in the place of your variables when you create it.
\frac{x}{7}=2
This generates (when you turn off Display Mode and switch the output to Flat MML):
<math><mrow><mfrac><mi>x</mi><mn>7</mn></mfrac><mo>=</mo></mrow><mrow><mn>2</mn></mrow></math>
You might be tempted to put the variables in there.
\frac{x}{a}=b
Unfortunately, that tells the converter to math that they are identifiers <mi> instead of numbers <mn>. The identifiers are rendered in italics while the numbers are not.
<math><mrow><mfrac><mi>x</mi><mi>a</mi></mfrac><mo>=</mo></mrow><mrow><mi>b</mi></mrow></math>
You may also have noticed the lack of namespace in the code generated from the temml.org website. The namespace on the math element is required for XML documents but not for HTML5, so it should work just fine without it.
All things considered (especially since I already manually type LaTeX for almost all of my assignments), I recommend the LaTeX enclosed in the \ ( and \ ) delimiters rather than MathML.
Hi @hamiltonmath,
I don't have an answer for you, but I wanted to reply here are tag @James to see if he has any input or suggestions. He's a math teacher and a programming whiz, so this might be right up his alley. No guarantee that he'll be able to reply though, as he (along with most others here in the community) has a full time job and is only able contribute here when he has free time.
-Chris
Don't use the equation editor to create the image, but enter the LaTeX directly into the text of the question, surrounded by the LaTeX delimiters. Those are \ ( and \ ) but without the space after the \. The space I put in is to keep the Community software from recognizing it as LaTeX and formatting it (and hiding the delimiters).
For example, this question will give the type of output you're looking for.
Solve \(\frac{x}{[a]}=[b]\).
You could use \dfrac if you want a full sized fraction.
The thing with manually putting in LaTeX rather than using the equation editor is that it will not show in the text of the question until you're previewing the quiz.
A much more difficult (in my opinion) way to get what you want requires the use of MathML. This requires you editing the HTML of the page to insert the MathML code, but it will show up as soon as you update the question.
<p>Solve <math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac><mi>x</mi><mn>[a]</mn></mfrac><mo>=</mo><mn>[b]</mn></math>.</p>
Here is the visual difference between the two.
While editing the question the LaTeX shows.
Quiz edit mode
While previewing (or taking) the quiz, they look the same.
Preview mode
Historically, there had been problems with using MathML with certain browsers. I think most of those have been worked out, but I haven't checked recently.
There are several benefits to the LaTeX approach that make it my go-to method.
There are sites that will convert LaTeX to MathML for you. I'm not endorsing it, but the first one Google came up with was temml.org. They added a bunch of extra stuff to the code so it's not as simple as what Canvas gave me. This is because it interpreted the [ and ] used to denote a variable as math operators. That would completely break what you're trying to do.
That means that you should put a number in the place of your variables when you create it.
\frac{x}{7}=2
This generates (when you turn off Display Mode and switch the output to Flat MML):
<math><mrow><mfrac><mi>x</mi><mn>7</mn></mfrac><mo>=</mo></mrow><mrow><mn>2</mn></mrow></math>
You might be tempted to put the variables in there.
\frac{x}{a}=b
Unfortunately, that tells the converter to math that they are identifiers <mi> instead of numbers <mn>. The identifiers are rendered in italics while the numbers are not.
<math><mrow><mfrac><mi>x</mi><mi>a</mi></mfrac><mo>=</mo></mrow><mrow><mi>b</mi></mrow></math>
You may also have noticed the lack of namespace in the code generated from the temml.org website. The namespace on the math element is required for XML documents but not for HTML5, so it should work just fine without it.
All things considered (especially since I already manually type LaTeX for almost all of my assignments), I recommend the LaTeX enclosed in the \ ( and \ ) delimiters rather than MathML.
Very nicely put. I think that I have relied on MathML a bit too much, whereas I think I should have focused on LaTeX a bit more. I appreciate you taking time out to answer there and I look forward to checking it out.
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in