Writing Mathematical Expressions in Canvas Using LaTeX

If you teach in quantitative subjects that use mathematical or chemical expressions, equations, and formulae, there are some features in Canvas you should know about to help you make mathematical expressions that display properly while also being accessible to a variety users. It also might be worth your time to learn more about LaTeX, a markup language specifically for displaying math symbols and expressions. This article will cover simple to more advanced options, and share some links to help you work more efficiently with math symbols in your Canvas course.

Use the Canvas Math Equation Editor (the slow way)

The most straightforward way to input mathematical formulae in Canvas is to use the Math Equation Editor built into the Rich Content Editor.

The button to access the Math Equation Editor from the Canvas Rich Content Editor is shown highlighted in red.

The Math Equation Editor functions in a similar way to what you might have used in Microsoft Word — to input a formula, you can type and/or click from an array of buttons to do things like shift to an exponent, make a fraction, add an integral, input a Greek letter, etc. While it works fine, it is quite cumbersome and slow to build equations in this manner – it might take you a couple dozen mouse-clicks to create a single formula!

Adding equations by clicking through all the buttons can take a long time.

Use the Canvas Math Equation Editor with LaTeX (the fast way)

The Canvas Math Equation Editor also enables using LaTeX (“lay-tech”). LaTeX is a markup language for writers to signify when they are using a mathematical expression, and then Canvas takes care of displaying it in a standardized and predictable way. For example, the LaTeX form of the quadratic formula shown earlier is:

x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}

If you know the LaTeX format, you can input it right into the equation editor, and then make adjustments as needed. Once you know the syntax of LaTeX, it makes mathematical expressions a lot easier to input in a way that ensures a reliable, high-quality, and accessible display.

From the Math Equation Editor, use the toggle button to “Directly Edit LaTeX” and skip the tedious buttons.

Use LaTeX Directly in Any Canvas Text Field

In Canvas, you can also use LaTeX expressions in just about any field that accepts text. However, you must let Canvas know you are using LaTeX by using specific “character wraps” or delineating characters around your LaTeX syntax. In the below examples, the delineating characters are highlighted in red.

For inline display, to show the expression within a paragraph of regular text, you would use:

\(...\)

For block display, to set the expression into its own separate center block, you would use:

$$...$$

In both cases, you would add the LaTeX expression you want to display into the space between the wraps, where the ellipsis is shown.

Inline example:

The area under a curve is \(area = \int_{a}^b f(x)dx\)

Block example:

Using page 83 in your textbook, please also solve:
$$y=x^2$$
$$y = mx + b$$
$$\sqrt(s)$$

Here’s how it looks when pasted into the text editor on a Canvas Page:

Here’s how it would display, after you hit “Publish” on the Page. Note the differences between the inline and block presentation:

You can input LaTeX into any Canvas text field, but keep in mind that inline display will work better in some areas than block display (such as within titles for Assignments or Pages).

Learn More About LaTeX

There are many resources to learn the unique syntax of LaTeX and generate larger volumes of mathematical content. Here are some places to get started:

While there is a bit of a learning curve to picking up LaTeX, it’s not as daunting as it may initially appear. And, if you spend a lot of time working with mathematical symbols, it’s definitely worth the effort to become familiar with it!

 


Photo by Karolina Grabowska from Pexels.

This resource is shared by the Gwenna Moss Centre for Teaching and Learning (GMCTL), University of Saskatchewan, under a CC BY-NC-SA license.