ZHAW Project Work 2
Working your thesis with Quarto and typst
Welcome
This is an Introduction to Students from the Degree Applied Digital Life Sciences who are writing their Project Work 2 (PA2) thesis.
You are required to write your thesis using a markup language. This document introduces two options that we ourselves use very heavily to write our reports.
Before we get into the details, let’s clarify what a markup language is. A markup language is a text-encoding system which specifies the structure and formatting of a document. They separate content from formatting. For example; instead of clicking a button to make text bold, you write special symbols around the text to indicate it should be bold. Common examples of markup languages include HTML, Markdown and LaTeX.
LaTeX is traditionally the academic standard with excellent mathematical typesetting and precise control over document layout. It’s widely used and accepted by journals. However, LaTeX has a steep learning curve with complex syntax, produces cryptic error messages that are difficult to debug, and requires managing numerous packages and dependencies. Setting up consistent formatting often involves extensive troubleshooting.
In this document, we introduce an approach: Quarto. Quarto is itself not a markup language but rather a publishing system that uses a backend (tbd) to produce PDF or html outputs. There are a number of advantages of using quarto over latex:
- Quarto is based on Markdown: Markdown is not just machine readable, Markdown is human readable as well. You can easily read and write markdown text without needing to see the rendered output.
- Quarto is designed to integrate a scripting language like R or Python. This enables to make complex tables or plots from data from within your document.
- Since Quarto is based on pandoc, you can export to a number of output formats. To submit your thesis, will need to create a pdf. But you might also like to turn your thesis into a website, see this example.
What about Jupyter Notebooks?
Quarto is in some ways similar to Jupyter Notebooks, which is very dominant in the python community. Quarto and Jupyter both integrate computer code and human language to produce a litarate programming output. Both are designed to work with various scripting languages such as Julia, Python and R.
However, Jupyter Notebooks have several design flaws. For one, they are not plain text documents. Secondly, code input its output are merged into one file. This makes several things much more complicated, including (but not limited to) version control. In addition, the execution options for cells are very limited and abstracted away from the user in a complex JSON format.
Some of the downsides of Jupyter Notebooks are exellently presented in this talk by Joel Grus I don’t like notebook held at the JupyterCon 2018.