LaTeX support is great, can we get TikZ & PGF?

0 Likes

I would like to see TikZ & PGF integration, from ctan.org:

"PGF is a macro package for creating graphics. It is platform- and format-independent and works together with the most important  backend drivers, including pdf and dvips. It comes with a user-friendly syntax layer called TikZ"

You could use TikZ to create graphs, geometric figures and more from syntax inside LaTeX.
We would no longer have to create bulky image files for all sorts of things, and instead just write them out in TikZ.

Check it out: https://ctan.org/pkg/pgf?lang=en 

Tags (5)
3 Comments
Stef_retired
Instructure Alumni
Instructure Alumni
Status changed to: Open
 
James
Community Champion

This is one of those ideas that would be very helpful to a few people and I would love to have it myself. I don't think it will happen, though, and one should not wait around for it to happen. Instead seek alternatives that can be used now while you drum up support for it.

Implementing TikZ and PGF is quite the undertaking. Not only would you need to support TikZ and PGF, but all of the libraries that go with it that make it truly useful. I would want CircuitTikZ, despite TikZ having their own circuits library. The only reason for that is because I have existing code that uses it. Most of my graphics are done with PGF instead of TikZ, though. Although TikZ support for matrix of nodes would be handy.

It's kind of a different question than supporting LaTeX. Canvas uses MathJax to render LaTeX in the browser, but MathJax doesn't support TikZ. TikZ is included in LaTeX documents, but the only LaTeX supported by Canvas is some of the math environments. Saying that Canvas supports LaTeX is really saying that Canvas supports some math LaTeX. You would need a different set of delimiters to set off TikZ or PGF code.

Then comes the issue of accessibility, which Canvas is very dedicated to. For math LaTeX, they can provide the LaTeX or convert to MathML. How do you do that for a TikZ image? Students aren't going to understand the TikZ or PGF code.

There's also the issue of reliability. CTAN packages can change and Canvas just isn't set up to test them to make sure they're stable. They also tend to stick with code for a long time, rather than upgrading to the latest version.

There are libraries such as TikZJax that support scripts to convert TikZ into SVG. A problem there is that Canvas does not support adding scripts to the content of a page. You would have to modify the code to look for classes instead. Theoretically, this might be done now by an admin who is willing to add the code to the global custom JavaScript for the (sub)account, but they may be put off by the description of how it works. These four words from the documentation are very off-putting: "Then core is dumped".

Any implementation would likely involve Canvas installing LaTeX on their servers and then running a service, using their CPU resources, to process the TikZ code into an SVG image and deliver the SVG. This is what they did for years with math code, but they didn't need a full installation of LaTeX to do that. The images were also relatively quick to process -- some of the TikZ and PGF images can take a while (and there would be no support for --shell-escape, which is critical for some of mine). From their perspective, it would be a lot easier to just have people upload images.

Creating the image and uploading it to the web is the solution that kept reoccurring when I went looking for JavaScript support for TikZ or PGF. Create a SVG image using the standalone or tex4ht packages and then upload the image into Canvas.

ProductPanda
Instructure
Instructure
Status changed to: Archived
Comments from Instructure

As part of the new Ideas & Themes process, all ideas in Idea Conversations were reviewed by the Product Team. Any Idea that was associated with an identified theme was moved to the new Idea & Themes space. Any Idea that was not part of the move is being marked as Archived. This will preserve the history of the conversations while also letting Community members know that Instructure will not explore the request at this time.