Div Anchors Extension Demo
This document demonstrates the div-anchors Quarto extension, which adds visual URL anchor links to theorem divs for HTML output.
Hover over any of the theorem blocks below to see the anchor link (§) appear. Click it to copy a direct link to that block.
1 Theorems
Theorem 1 (Pythagorean Theorem) For a right triangle with legs \(a\) and \(b\) and hypotenuse \(c\): \[a^2 + b^2 = c^2.\]
Theorem 2 If \(f\) is continuous on \([a, b]\) and \(k\) is any value between \(f(a)\) and \(f(b)\), then there exists \(c \in (a, b)\) such that \(f(c) = k\).
2 Lemmas and Corollaries
Lemma 1 For all vectors \(\mathbf{u}, \mathbf{v}\): \[|\langle \mathbf{u}, \mathbf{v} \rangle|^2 \leq \langle \mathbf{u}, \mathbf{u} \rangle \cdot \langle \mathbf{v}, \mathbf{v} \rangle.\]
Corollary 1 For all vectors \(\mathbf{u}, \mathbf{v}\): \[\|\mathbf{u} + \mathbf{v}\| \leq \|\mathbf{u}\| + \|\mathbf{v}\|.\]
3 Definitions and Examples
Definition 1 A natural number \(p > 1\) is prime if it has no positive divisors other than \(1\) and itself.
Example 1 The first five prime numbers are 2, 3, 5, 7, and 11.
4 Cross-References
Theorem Theorem 1 is often taught in secondary school. The result in Lemma 1 implies the Corollary 1. See Definition 1 and Example 1 for an introduction to prime numbers.
5 Proof (without anchor, unnumbered)
Proof. Let \(a\) and \(b\) be the legs of a right triangle and \(c\) the hypotenuse. Arrange four copies of the triangle around a square with side \(c\). The outer shape is a square with side \(a + b\), so \((a + b)^2 = c^2 + 4 \cdot \tfrac{1}{2}ab\), which simplifies to \(a^2 + b^2 = c^2\).