Figures

A figure wraps an image or a TikZ diagram with a caption:

::::figure{#phase-portrait}
![Phase portrait of the damped pendulum](https://example.com/pendulum.png)
 
Phase portrait of the damped pendulum. Trajectories spiral into the origin.
::::

Structure:

  • The first block is the figure content – an image, or a nested :::tikz directive (the figure fence then needs four colons; see nesting).
  • Everything after it is the caption. It renders below the content in caption styling and can contain inline formatting and math.
  • The optional {#id} gives the figure a stable id for future cross-referencing. Use short, meaningful ids ({#fig-convergence}).

With a TikZ diagram:

::::figure{#commutative}
:::tikz
\begin{tikzpicture}
  \node (A) at (0,1) {$A$};
  \node (B) at (2,1) {$B$};
  \draw[->] (A) -- (B);
\end{tikzpicture}
:::
 
The induced map commutes with the projections.
::::

Figures are for content the text refers to. An image that simply flows with the prose does not need the wrapper – plain image syntax is fine.