Summary
In lectures/divergence_measures.md (lines ~134–140) the KL-divergence derivation uses a bare top-level \begin{align} block:
\begin{align}
D_{KL}(f \parallel g) &= \sum_{i} f_i \log\left[\frac{f_i}{g_i}\right] \\
&= \sum_{i} f_i \left[\log f_i - \log g_i\right] \\
&= \sum_{i} f_i \log f_i - \sum_{i} f_i \log g_i \\
&= -H(f) + H(f,g) \\
&= H(f,g) - H(f)
\end{align}
This is not a build error — the amsmath MyST extension renders bare amsmath environments and the book builds fine. It's a minor style/consistency note: this is the only lecture in the series using a bare top-level align. The QuantEcon convention is to wrap multi-line display math in $$ with aligned (see math.md), which is also the more robust form for PDF/LaTeX output.
Suggested change
$$
\begin{aligned}
D_{KL}(f \parallel g) &= \sum_{i} f_i \log\left[\frac{f_i}{g_i}\right] \\
&= \sum_{i} f_i \left[\log f_i - \log g_i\right] \\
&= \sum_{i} f_i \log f_i - \sum_{i} f_i \log g_i \\
&= -H(f) + H(f,g) \\
&= H(f,g) - H(f)
\end{aligned}
$$
Context
Low-priority finding from the May 2026 style audit of the QuantEcon lecture series — report: https://quantecon.github.io/audit.2026-05.style-guide/ (see the divergence_measures page). Consistency only; no rush.
Summary
In
lectures/divergence_measures.md(lines ~134–140) the KL-divergence derivation uses a bare top-level\begin{align}block:\begin{align} D_{KL}(f \parallel g) &= \sum_{i} f_i \log\left[\frac{f_i}{g_i}\right] \\ &= \sum_{i} f_i \left[\log f_i - \log g_i\right] \\ &= \sum_{i} f_i \log f_i - \sum_{i} f_i \log g_i \\ &= -H(f) + H(f,g) \\ &= H(f,g) - H(f) \end{align}This is not a build error — the
amsmathMyST extension renders bare amsmath environments and the book builds fine. It's a minor style/consistency note: this is the only lecture in the series using a bare top-levelalign. The QuantEcon convention is to wrap multi-line display math in$$withaligned(seemath.md), which is also the more robust form for PDF/LaTeX output.Suggested change
Context
Low-priority finding from the May 2026 style audit of the QuantEcon lecture series — report: https://quantecon.github.io/audit.2026-05.style-guide/ (see the
divergence_measurespage). Consistency only; no rush.