Migrating LaTex formula from Classic Quiz to New Quizzes

Jump to solution
GideonWilliams
Community Coach
Community Coach

When migrating a classic quiz with LaTex formulas to New Quizzes, the LaTex formulas are converted into images and are no longer editable.

When writing a LaTex syntax in the formula editor in Classic quizzes you do not need to include the surrounding \( and \) code brackets eg

f1.PNG

If you do then it looks like this and does not produce a suitable equation

f2.PNG

When you migrate a question with LaTex (written without the extra brackets) into New Quizzes, it becomes an image and uneditable:

f3.PNG

When I write the LaTex syntax in New quizzes - this is what I have to write to get it accepted:

f4.PNG

f5.PNG

So for some reason, you have to add in an extra pair of code brackets around the LaTex for it to be read in New Quizzes but you dont in Classic Quizzes.

Do Classic quizzes and New quizzes use different equation editors?

Anyone help?

Labels (1)
1 Solution
James
Community Champion

@GideonWilliams 

There are some differences between the quiz engines.

  • Both Classic Quizzes and New Quizzes use Tiny MCE as the editor.
  • There is also the equation editor, which uses MathQuill (for both engines, I believe).
  • When direct entry for LaTeX anywhere in Canvas was added, then yanked, then finally added back, they used MathJax as the renderer. New Quizzes uses KaTeX instead (the only place I've found in Canvas that uses it, KaTeX is considered faster than MathJax).
  • When you insert in equation using Classic Quizzes, it comes through as an image. When you insert an equation with New Quizzes, it comes through as LaTeX delimited with \( \).
  • Classic Quizzes supports an advanced view of the equation editor but there is no advanced editor for LaTeX in New Quizzes, it had to be done using the direct entry with delimiters \( \).

In Classic Quizzes, there is a separate advanced equation editor and it knows you're in math mode, so entering \( and \) is not necessary. In New Quizzes, there is no a

Direct entry of LaTeX using \( and \) are now available anywhere in Canvas. They recognize the \( and \) and they also recognize the existing images that were created the old way and converts them into MathJax rendered objects.

What I would suggest is entering \( and \) in the text of the question without invoking the equation editor. Then, when it gets migrated, it would carry over the \( ... \) that New Quizzes uses anyway and it should work.

I read somewhere a couple of weeks ago that using the \( \) direct-entry method in classic quizzes was causing problems on mobile devices unless there was at least one item on the page that used an equation. I have not tested that myself, but it sounds like what was being explained when the system was being developed (a side-effect of loading MathJax for existing content), but not where it ended up (available anywhere).

View solution in original post