New Term, New Tools

I meant to finish writing this up nearer to the start of academic year. As it is, we are nearly at the end of the first term of teaching. Yet I still feel moved to write about some of the changes I've recently made to my workflow.

Previously, I had settled on a disparate collection of tools to help me with various aspects of preparing and delivering teaching: Google Slides for lecture materials; Sphinx, then later Hugo, for generating websites of exercises or other supplementary material; and the venerable LaTeX for creating coursework briefs and exam papers.

There was no master plan here. I assume I had good reasons at the time for choosing a particular tool over the many alternatives. But for the most part, those reasons have been lost to history. What I'm left with typically is a lingering sense of frustration that the tool I'm using isn't perfect for the job.

Take Slides, for instance. I'm comfortable in it, much more so than Powerpoint. It's convenient and easy to use. Yet there are annoyances, too. Displaying code examples is fiddly, and I've never felt entirely happy about using a proprietary format that can't be backed up locally or managed using a version control system.

With LaTeX, on the other hand, the pros and cons are reversed. There, I can enjoy the advantage of local storage and an open, text-based format that is amenable to version control. But what I don't enjoy so much is the archaic programming model that you're forced to wrestle with when a package doesn't do exactly what you need, or you want to create your own package to speed up document generation in the future. I'm no LaTeX newbie, having used it extensively since the late 80s, but I've never fully acclimatised to its weirdness - understandable though that weirdness is, given its age and origins.

This is where two new (to me) tools, Quarto and Typst, enter the story. I'll save discussion of the latter for another time and focus here on the former.

Quarto describes itself as "an open-source scientific and technical publishing system". It uses a variant of Markdown as a source format, boosted by various enhancements that allow it to render code blocks with configurable line numbering/highlighting, display callouts of various types, control the layout of figures and tables, etc. Interestingly, it is also possible to have executable code blocks, written in Python, R or Julia, embedded within a Quarto document. These code blocks are executed on render and the output is incorporated into the rendered document, but you can also 'freeze' documents so that computation is not repeated needlessly when a global render of the entire document collection is performed.

By default, Quarto outputs HTML, but it can also generate PDF (via LaTeX), MS Word documents, LaTeX files, even Typst files. Thus far, I've explored only the default format, HTML.

Perhaps the most useful aspect of Quarto is its ability to generate so many different types of structured output, all from the same Markdown input. Beyond simple documents, you can produce presentations using reveal.js, Powerpoint or Beamer for LaTeX as output formats. You can also transform collections of Quarto documents into a website or web-based book.

I've ended up using Quarto in two different ways. First, I've used it to create set of lab exercises, transform these into a website and then publish said website via GitHub Pages. Second, I've used it to create reveal.js slide decks for each of my lectures. Overall, I'd say it has been a successful effort, and I'll certainly be using it in the future in some capacity (for the creation of websites at the very least).

More from Nick
All posts