This note is a template for the notes system. Copy this file as a starting point for any new note. Math is rendered at build time with KaTeX, so pages ship as plain HTML — no client-side math JavaScript.
A note on math delimiters: prefer \(...\) for inline and \[...\] for display, since Markdown's _ and * can collide with subscripts/multiplication inside $...$. Both work, but the backslash forms are safer. Display math must be surrounded by blank lines — a \[ opened mid-paragraph will not render.
1. Inline and Display Math
Inline: the Gaussian distribution is
Display mode centers the equation:
2. Numbered Equations
KaTeX does not auto-number equations; use \tag{...} to number the ones you want to reference:
Bayes' theorem (1) is the foundation of probabilistic inference.
3. Aligned Systems
Wrap aligned inside display math:
4. Matrices
5. Callout Boxes
Callouts are plain HTML — Markdown lets you mix raw HTML freely. Leave a blank line after the opening <div> and before the closing </div> so the content inside is still processed as Markdown (including math):
A function
If
Equality holds iff
Do not confuse the empirical risk
6. Code Blocks
Fenced code blocks are highlighted at build time (PrismJS via Eleventy — no client-side JS):
import numpy as np
def gradient_descent(f_grad, x0, lr=1e-3, steps=1000):
"""Vanilla gradient descent."""
x = x0.copy()
for _ in range(steps):
x -= lr * f_grad(x)
return x
mu = np.zeros(2)
Sigma = np.array([[1.0, 0.8],
[0.8, 1.0]])
samples = np.random.multivariate_normal(mu, Sigma, size=1000)
7. Lists and Inline Code
Available macros (defined in .eleventy.js):
\R→(reals) \E→(expectation) \norm{v}→\abs{x}→\inner{u}{v}→
To add a new note: drop a .md file into src/notes/ with frontmatter (layout, title, date, displayDate, tags, description), then run npm run build. The notes index updates automatically. Add draft: true to keep a note off the index while you write it.