Literate programming
In this weekβs workshop, we will explore Markdown and combine code and prose in our first Quarto document.
Introduction
Live coding
Review the material that we explored in Week 8βs live-coding session.
Lab
Exercise: Create slides using Quarto
This weekβs task is to adapt the code shown in the live-coding session and output the results as slides in either PowerPoint or reveal.js format. The linked requirements.txt file lists all of the packages needed. Remember that to install the packages from requirements.txt into your virtual environment you need to run python -m pip install -r requirements.txt
- Review the guidance on outputting to PowerPoint and reveal.js in Quarto
- Create a virtual environment
- Install the necessary packages
- Create a new quarto document called
slides.qmd - Preview the document with
quarto preview slides.qmd
Further reading
- Knuth, D. E. (1984). Literate programming. The computer journal, 27(2), 97-111. https://www.cs.tufts.edu/~nr/cs257/archive/literate-programming/01-knuth-lp.pdf
- Van Rossum, G., Warsaw, B., & Coghlan, N. (2001). PEP 8βstyle guide for python code. Python.org, 1565, 28. https://peps.python.org/pep-0008/
- Galli, K. (2025). Quarto with Python Live Coding Video Series. [Video]. YouTube. https://www.youtube.com/playlist?list=PL9HYL-VRX0oQZPzhJR022G_bV4vynT4Ol
- Ryan, J. (2024, August 20). Automating Quarto reports with parameters. Posit Blog. https://posit.co/blog/parameterized-quarto/.