Using LaTeX in the CANVAS Editor
Entering math formulas
Use the delimiters \( ... \) to typeset in-line math and the delimiters \[ ... \] to typeset display math. For example, the syntax below
To solve the equation \(x^2 - 3x - 4 = 0\), we can use the quadratic formula
\[x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.\]produces the following output in CANVAS after saving:
To solve the equation \(x^2 - 3x - 4 = 0\), we can use the quadratic formula \[x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.\]
However, not all LaTeX features and packages are supported by the CANVAS compiler. We have collected some general guidelines below, as well as links to some additional resources.
Supported Features
Unsupported Features
Other Comments
As mentioned above, only the delimiters
\(...\)will cause in-line math to render. The standard dollar sign delimiters$...$will not work, nor will\begin{math}For display math, the double dollar signs
$$...$$will sometimes render, but other times it may cause issues for the CANVAS compiler. The delimiters\[...\]are preferable. The environment\begin{displaymath}does not render.When working within an environment like
\begin{matrix}, do not enter between your desired rows. For example, the matrix \[\begin{matrix} 0 & 1 \\ 1 & 0 \end{matrix} \] should be typeset as\begin{matrix} 0 & 1 \\ 1 & 0 \end{matrix}as opposed to
\begin{matrix} 0 & 1 \\ 1 & 0 \end{matrix}For math environments in display mode, delimiters are optional. For example, both
\begin{matrix} 0 & 1 \\ 1 & 0 \end{matrix}and
\[ \begin{matrix} 0 & 1 \\ 1 & 0 \end{matrix} \]will render.
The environment
\begin{equation}and related environments will still render, but CANVAS does not support the numbering or reference feature.In general, due to these formatting differences the best way to use the LaTeX CANVAS editor is to type directly into it, versus copying and pasting from another source. If you have a preexisting .tex file that you want to convert to an accessible format, please see our dedicated resources.
MathJaX Resources
Since CANVAS uses MathJaX to render LaTeX, most information about MathJaX syntax is applicable to this setting. However, unlike someone who is authoring an HTML page from scratch, the CANVAS user cannot edit the page’s MathJaX configuration to load additional packages or extensions. Therefore, the only packages available for use in CANVAS are those which are included in the default MathJaX configuration.
Also, CANVAS currently uses MathJaX version 2.7.7., so some newer features may not be supported.
Subject to these caveats, the following documentation pages from the official MathJaX site may be of use:
TeX and LaTeX Support: https://docs.mathjax.org/en/latest/input/tex/index.html
Differences from Actual TeX: https://docs.mathjax.org/en/latest/input/tex/differences.html
TeX and LaTeX Math Delimiters: https://docs.mathjax.org/en/latest/input/tex/delimiters.html
Supported TeX/LaTeX Commands: https://docs.mathjax.org/en/latest/input/tex/macros/index.html