This spec defines the canonical card format for the handbook.
- Markdown body + YAML frontmatter.
- Frontmatter stores metadata only (id/title/tags/related/prereqs).
- Content lives in the Markdown body.
- Optional plot visuals live in an inline Markdown code fence (see
## Optional plot block).
## Formula## Parameters## What it means## What it's used for## Key properties## Common gotchas## Example## See also(optional)
- Use broad inclusion criteria: include pseudocode whenever it improves clarity, even for simple one-step formulas.
- Add
## How to Compute (Pseudocode)near the bottom of the card (recommended: after## Example, before## See also) when useful. - Add
## Complexityafter## How to Compute (Pseudocode)when pseudocode is present. - Report
Time: O(...)at minimum. - Report
Space: O(...)when non-trivial (or for consistency). - Define symbols used in complexity claims (for example, (n), (|V|), (|E|)).
- Use
##headings for sections. ## Plotis optional if you want a labeled plot section.## How to Compute (Pseudocode)and## Complexityare optional.
- Display math allowed:
\[ ... \]. - Inline math allowed:
\( ... \).
- Plots are optional and should not be required for a valid card.
- Use a fenced code block with language
plot. - The renderer reads this block client-side in MkDocs and leaves cards without it unchanged.
- Recommended fields:
fn(single curve) orfns(multiple curves separated by|)type: barsplusxsandysfor bar charts (each|-separated)xmin,xmax,ymin,ymax(optional bounds)height,width(optional pixel sizing)title,color,grid(optional display settings)colors,labels(optional|-separated lists forfns)
Example:
## Plot
```plot
fns: tanh(x) | 1/(1+exp(-x))
colors: #ff6b2c | #1f6feb
labels: tanh | sigmoid
xmin: -4
xmax: 4
ymin: -1.2
ymax: 1.2
height: 280
title: tanh(x)
```Bar chart example:
## Plot
```plot
type: bars
xs: 0 | 1 | 2 | 3
ys: 0.1 | 0.3 | 0.4 | 0.2
xmin: -0.5
xmax: 3.5
ymin: 0
ymax: 0.5
title: Example PMF
```- Formula is the hero (largest text on the page).
- Parameters are medium.
- Explanatory text is smaller (encyclopedia style).
- Keep it language-agnostic and easy to scan.
- Include inputs and outputs when helpful.
- Prefer short blocks and clear variable names.
- For simple formulas, pseudocode can be only a few lines.
---
id: domain.topic
heading: Title
...
---
# Title
## Formula
\[
...
\]
## Plot
```plot
fn: sin(x)
xmin: -6.28
xmax: 6.28
ymin: -1.2
ymax: 1.2- ...
...
...
- ...
- ...
...
Input: ...
Output: ...
...
- Time: (O(\cdot))
- Space: (O(\cdot)) (if useful)
- Assumptions: define symbols used above
- ...