chapter{Another chapter} label{cha:another_chapter}

This is a reference to Chapter~ref{cha:a_chapter}.footnote{Footnotes are numbered on a per-chapter basis.} In particular, Section~ref{sec:a_section} talks about code and math. I'm particularly partial to Listing~ref{code:hello_world} and Eq.~eqref{eq:stokes_theorem}.