Lecture 3: Literate Programming

Author

Brian J. Smith

Published

January 22, 2026

Literate Programming

In class, I live-coded in Quarto to demonstrate Literate Programming. The homepage.qmd document and the lecture recording are available on Canvas.

Resources

Here are some useful resources that I referred to during the lecture or would like to make you aware of now.

Math

I forgot to mention this during the lecture, but easily including Greek letters, math symbols, or equations is also very easy in a Quarto document. By default, HTML pages render the math using MathJax.

Inline

You can include equations, like \(y = mx + b\), inline in your documents. You create an inline equation by wrapping the expression in $.

Chunks

You can also write math in chunks on their own line(s). You begin a chunk with $$, write the chunk, and end it with $$.

\[ \mu = \beta_0 + \beta_1 x \] \[ y \sim Normal(\mu, \sigma^2 ) \]