13  Captioning and referencing equations

This section introduces how to add captions to equations, and reference them in text.

13.1 Overview

  • Teaching: 5 minutes
  • Exercises: 5 minutes

13.2 Questions

  • How do I caption an equation?
  • How do I reference an equation?

13.2.1 Numbering equations

You can make reference an equation by adding a label starting with #eq- after the equation $$. For example:

$$
Y \sim X\beta_0 + X\beta_1 + \epsilon
$$ {#eq-linear}

Gives

\[ Y \sim X\beta_0 + X\beta_1 + \epsilon \tag{13.1}\]

You can then refer to the equation in text using @eq-linear:

Our model is given in Equation 13.1.

13.3 Other equation-adjacent referencing

You can also use and reference theorems, lemmas, conjectures, and many more - to see these, see the Quarto documentation: theorems and proofs documentation.