Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

- Home
- Community Hub
- Accessibility
- Forum
- Re: Canvas, LaTeX and MathJAX

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-03-2020
10:06 AM

We are servicing complaints from a number of departments about the inaccessibility of any LaTeX equations entered into the Canvas HTML page editor (and similar). The LaTeX is rendered as an inaccessible image. These departments are refusing to use Canvas because of this.

I wondered if anybody else has similar issues and, if so, would they join me in lobbying Instructure to add MathJax to Canvas so the LaTeX output would be accessible?

Adam

Solved! Go to Solution.

1 Solution

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-21-2021
04:14 PM

This is a very big accessibility improvement that I'm very happy about!

21 Replies

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-04-2020
08:11 AM

Hi @adam_marshall - you might want to read through this thread: Best way to add LaTex equations.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-10-2020
06:12 PM

@crafte The link you provided is no longer available.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-12-2020
02:05 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-12-2020
07:09 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-12-2020
08:57 PM

Sorry @mho - looks like there was an extraneous "s" at the end of the url.

Try this: https://community.canvaslms.com/t5/Instructional-Designer/Best-way-to-add-LaTeX-equations/m-p/175131

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-30-2021
06:49 PM

The link is no longer available.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-28-2020
06:43 PM

Hey Adam,

I just heard from someone in the other accessibility space about the accessibility of math equations and he shared some input on the accessibility of the Canvas LaTex equations in Canvas. I'm not an expert on this stuff, but looking at the code and from what what was said, there are a couple of things present in the code to make them more accessible:

`<img class="equation_image" title="\sqrt[1]{5}" src="https://usu.instructure.com/equation_images/%255Csqrt%255B1%255D%257B5%257D" alt="LaTeX: \sqrt[1]{5}" data-equation-content="\sqrt[1]{5}" style="max-width: 24px;">`

<span class="hidden-readable"><math xmlns="http://www.w3.org/1998/Math/MathML">

<mroot>

<mn>5</mn>

<mn>1</mn>

</mroot>

</math>

</span>

While an equation is displayed as at image, the alt text includes the LaTeX code and there is also MathML available. That said there is probably still a case to be made for adding MathJax. I seem to remember a conversation from a year or two ago where there was some concern about loading another JS library and browser support, I don't know how much of an issue it still is. I did find a couple previous ideas posted to the community:

- https://community.canvaslms.com/ideas/6922 (2016)
- https://community.canvaslms.com/ideas/8106 (from 2017 - lots of discussion and code samples here)
- https://community.canvaslms.com/ideas/12274-make-math-equation-editor-accessible (2018)

Perhaps it is time to make another run at it? Interestingly, I found this security update around a vulnerability in MathJax *in Canvas* - no idea what that is about?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-03-2020
05:33 AM

Hey Adam,

I ran into similar problems while creating pages in Canvas. In particular the lack of MathJax support is a bit frustrating. But I have made a workaround that let's you convert LaTeX articles to plain HTML (Using MathML) that can be read by the Canvas HTML editor.

It supports equations, equation numbers and referencing the equations. It also supports code highlighting and some other stuff. If you want to check it out you can do so here GitHub.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-26-2020
01:49 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-04-2020
10:06 AM

@rgerritsen Just following up on this. Maybe you already know about this, but perhaps others that are finding this thread don't. I'm a bit late to the game and just discovered a python wrapper for the Canvas API (https://github.com/ucfopen/canvasapi) thanks to a colleague. In short, this means that I can incorporate a few additional lines of python code to automatically read the .html file generated from your script and then post immediately to canvas.

In fact, I tend to use VSCode as my latex editor so I just built a separate build command that generate the pdf, textToHtml output.html file, and then automatically either update or post to canvas using the following (example template) from the python canvas api.

```
from canvasapi import Canvas
API_URL = "https://<institutuion>.instructure.com"
API_KEY = "<token goes here>"
canvas = Canvas(API_URL, API_KEY)
course = canvas.get_course('<course ID>')
file_name = "output.html"
f = open("./"+file_name);
page_body = f.read();
page_name = file_name[0:-5];
try:
page = course.get_page(page_name)
except:
page = course.create_page({'title': page_name});
page.edit(wiki_page={'body': page_body});
```

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-04-2020
12:43 PM

@KOliveras Cool, I didn't know about the canvas API. I will check it out and thanks for sharing this, this will speed up my workflow considerably.

Also thanks for the kind words about the repository earlier and letting me know it was useful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-12-2020
04:55 AM

@mho here is a new link for the same page: Best way to add LaTeX

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-26-2020
09:12 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-01-2021
01:54 PM

Yep. My experience with Math on Canvas has been a pretty disappointing and frustrating one so far.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-21-2021
04:14 PM

This is a very big accessibility improvement that I'm very happy about!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-24-2021
01:07 AM

Adding MathJAX to Canvas is a great improvement! However, **MathJAX does not seem to work in "all Canvas text fields"** as claimed in the Canvas Release 2021-02-20.

I am working to produce question banks for a Mathematics course at a Swedish university. Prior to February 20, I entered mathematical equations as LaTeX code through the Rich Content Editor (advanced view). Since Monday, February 22, equations are no longer displayed correctly. When viewing the raw HTML-code it seems that a lot of "garbage" had been inserted.

Eager to try the new MathJAX syntax I rewrote some of the questions in my bank. Unfortunately, this didn't help the problem. **Either the equation didn't render at all, which suggest MathJAX is disabled in the question bank setting, or it produced new "garbage". **It didn't help to import the questions to a quiz for preview, equations still did not render properly. Funny fact though, when I inserted LaTeX code in the titel of the question bank it rendered beautifully!

**Question: Have the developers forgotten to add support for MathJAX in the question bank environment?**

Kind regards,

John

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-24-2021
02:19 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-24-2021
02:41 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-24-2021
04:06 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-04-2021
03:57 PM

The Feburary 2021 release notes had a note added that they were working on it. It seems that the problem is with formulas in classic quizzes. When they have it working, they will re-enable it for everyone. For the interim, they have thrown it behind a feature flag that a Canvas Admin could enable.

I'm not sure if the problem is with the conversion of existing images into MathJax or if the problem is that it doesn't display inline LaTeX within quizzes. The documentation didn't go into detail.

Since I never created quizzes that used the inline LaTeX and no one else at our institution knew this was even a thing (when I asked last year if anyone wanted added to a subaccount where I enabled MathJax, no one was interested) , I could enabled that and I would be the only person affected. I switched all my classes back to my implementation of MathJax (which checked to see if Canvas' version was already loaded before running) so I'm okay, but it's tempting to turn it on. I think not knowing the exact problem is what is keeping me from doing that.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-04-2021
05:34 PM

- Reference
- Community Guidelines
- Security
- Developers
- Open Source