latex-rust 1.0.2

Pure-Rust LaTeX math renderer. Parse to AST, TeX-faithful layout on exact rationals, emit SVG, PNG, or egui shapes. No JavaScript, no webview, no runtime.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
# latex-rust — Capabilities
**Version:** 1.0.2  
**Date:** 2026-09-04  
**License:** MIT OR Apache-2.0  
**Status:** Public crate 1.0.2 (SVG / PNG / egui; golds green; in-tree `Dim`)  

> Pure Rust LaTeX math renderer. No JavaScript. No webview. No runtime dependencies.  
> Surpasses MathJax and KaTeX in correctness, performance, and platform coverage.

---

## 1. Mission Statement

MathJax and KaTeX are JavaScript libraries. Every non-web application that needs LaTeX rendering must either bundle a JS runtime, shell out to a subprocess, or accept degraded output. latex-rust eliminates that dependency entirely.

latex-rust is a pure Rust crate that:
- Parses LaTeX math expressions into a typed AST
- Lays out that AST using a complete TeX-faithful box model
- Renders to SVG, PNG, or directly to egui primitives
- Runs identically on Windows, macOS, Linux, Android, and iOS
- Requires zero runtime dependencies beyond the Rust standard library

---

## 2. Where latex-rust Beats MathJax and KaTeX

| Capability | MathJax | KaTeX | latex-rust |
|---|---|---|---|
| Language | JavaScript | JavaScript | Pure Rust |
| Runtime dependency | Node / browser | Node / browser | None |
| Air-gap compatible | No | No | Yes |
| Exact-rational layout metrics | No | No | Yes (`Dim`) |
| Native desktop rendering | No | No | Yes |
| egui integration | No | No | Yes (native) |
| Android / iOS native | No | No | Yes |
| Startup time | Slow (JS parse) | Faster but JS | Instant |
| Memory footprint | Heavy | Moderate | Minimal |
| Honest error on unsupported input | Partial | Partial | Always |
| Hardware float in layout math | Yes | Yes | No (`Dim`) |
| Font metric precision | Limited | Limited | Full TrueType |

---

## 3. Architecture

```
latex-rust
├── src/parser/      LaTeX → AST
├── src/layout/      AST → Box model (TeX-faithful)
├── src/font/        Font metric tables, TrueType loader
├── src/render/
│   ├── svg/         Box model → SVG
│   ├── png/         Box model → PNG (via tiny-skia, feature `png`)
│   └── egui/        Box model → egui primitives (feature `egui`)
├── golds/           Gold test vectors
└── benches/         Layout and render benchmarks
```

These are public crate modules (`latex_rust::parser`, `layout`, `font`, `render`).
The same names are re-exported at the crate root. Embedded font *files* stay in
`fonts/` (STIX Two Math OFL); `src/font/` is the loader.

### 3.1 Parser

Input: LaTeX math string  
Output: `MathNode` AST  
Errors: `ParseError` — never a partial parse silently accepted

**Supported input forms:**
- Inline math: `$...$`
- Display math: `$$...$$` or `\[...\]`
- Raw expression (no delimiters, for programmatic use)

### 3.2 AST Nodes

Every node is a variant of `MathNode`. No implicit nodes. No surprises.

```
MathNode
├── Atom(char, AtomKind)           — single character/symbol
├── Fraction(num, den)             — \frac{}{} 
├── Radical(degree, radicand)      — \sqrt[n]{}
├── Superscript(base, exp)         — x^{}
├── Subscript(base, sub)           — x_{}
├── SubSup(base, sub, exp)         — x_{}^{}
├── Delimited(open, body, close)   — \left( \right)
├── Row(Vec<MathNode>)             — horizontal sequence
├── Matrix(style, colspec, rows)   — pmatrix, array, align, gather, …
├── Substack(Vec<MathNode>)        — \substack
├── Ref(key)                       — \ref
├── Tag / Label / NoNumber         — peeled into EnvRow inside environments
├── Hline / Intertext              — array / align rows
├── Sum(limits)                    — \sum
├── Integral(limits)               — \int
├── Product(limits)                — \prod
├── Limit(sub)                     — \lim
├── OverUnder(base, over, under)   — \overset \underset
├── Accent(base, accent)           — \hat \bar \vec \dot \ddot
├── Color(spec, body)              — \color after this point in a group
├── TextColor(spec, body)          — \textcolor{}{}
├── ColorBox(fill, body)           — \colorbox{}{}
├── FColorBox(border, fill, body)  — \fcolorbox{}{}{}
├── Text(string, style)            — \text{} \mathrm{} \mathbf{}
├── Space(SpaceKind)               — \, \; \quad \qquad
├── Operator(name, limits)         — \sin \cos \log named ops
├── Symbol(SymbolKind)             — Greek letters, arrows, relations
├── Strut(height, depth)           — vertical spacing
└── Phantom(MathNode)             — \phantom{}
```

### 3.3 Layout Engine (Box Model)

TeX-faithful box model. Every node produces a `Box`:

```rust
pub struct MathBox {
    pub width:   Dim,   // exact rational
    pub height:  Dim,   // above baseline
    pub depth:   Dim,   // below baseline
    pub italic:  Dim,   // italic correction
    pub content: BoxContent,
}
```

Layout rules follow Appendix G of The TeXbook exactly:
- Style propagation (display, text, script, scriptscript)
- Cramped style rules
- Mu (math unit) spacing table
- Delimiter sizing algorithm
- Radical vinculum height
- Fraction bar thickness
- Accent placement
- Operator limits placement

No approximations. No shortcuts. If TeX would render it one way latex-rust renders it that way.

### 3.4 Font System

TeX math requires specific font metrics. latex-rust ships with:
- **STIX Two Math** — full Unicode math coverage, OFL license, embeddable
- **Latin Modern Math** — TeX-native, OFL license, embeddable
- Font metric tables compiled to Rust at build time
- TrueType glyph outlines extracted at render time

Font metrics are stored as exact-rational `Dim` values — no hardware float in the layout path.

### 3.5 Renderers

**SVG renderer:**
- Self-contained SVG output
- Glyphs as `<path>` elements — no font embedding required
- Scales perfectly at any size
- Primary output format

**PNG renderer (`src/render/png`, feature `png`):**
- `tiny-skia` 0.11 rasterization; DPI-aware (`pixels = points × dpi / 72`)
- Without `features = ["png"]` every entry point is `Err(Unsupported)`
- Gold hashes lock PNG bytes at 72 / 144 / 300 DPI (`golds/png.toml`)
- On x86_64 with AVX2 — tiny-skia runs at peak performance automatically
- On Apple Silicon — tiny-skia uses the ARM NEON path, also fast
- No user configuration needed
- No compile flags required
- Works correctly on every supported architecture

**egui renderer (`src/render/egui`, feature `egui`):**
- TrueType outlines tessellated to `egui::Mesh`; rules and color boxes are `Shape::Rect`
- No SVG intermediate. Without `features = ["egui"]` every entry point is `Err(Unsupported)`
- Golds lock shape counts, mesh vertex/index counts, and bounding rects (`golds/egui.toml`)

---

## 4. Capability Inventory

### 4.1 Core Math Structures

| Capability | Status | Notes |
|---|---|---|
| Fractions `\frac` || Display and text style (`golds/layout.toml`) |
| Binomial `\binom` || Parsed as delimited fraction (`golds/parse.toml`) |
| Radicals `\sqrt` `\sqrt[n]` || Vinculum + optional degree |
| Superscript / subscript || Stacking, cramped style |
| Sub+superscript simultaneous || `x_a^b` |
| Limits on operators || Display vs inline position |
| Delimiters `\left \right` || Sized to content; extensible variants |
| Fixed-size delimiters || `\big \Big \bigg \Bigg` |
| Matrices || pmatrix (and siblings) |
| Cases `\begin{cases}` || Left brace; quad between columns (`golds/envs.toml`) |
| Arrays `\begin{array}` || `l` `c` `r` `\|`, `\hline` (`golds/envs.toml`) |
| Aligned equations || `\begin{aligned}` / `split` RL columns |

### 4.2 Symbols

| Capability | Status | Notes |
|---|---|---|
| Greek lowercase α β γ … || Full set + variants; STIX glyphs |
| Greek uppercase Α Β Γ … || `\Gamma``\Omega` |
| Hebrew ℵ ℶ ℷ ℸ || |
| Binary operators + − × ÷ ± ∓ … || Full TeX set; Bin atom class |
| Relations = < > ≤ ≥ ≠ ≈ ∼ … || Full TeX set; Rel atom class |
| Arrows → ← ↔ ⇒ ⇔ … || Short/long/harpoons; `\xrightarrow` stretches |
| Large operators ∑ ∏ ∫ ∮ ∯ … || Display/text sizing |
| Dots ⋯ ⋮ ⋱ … || `\ldots` `\cdots` `\vdots` `\ddots` `\iddots` |
| Set symbols ∈ ∉ ⊂ ⊃ ∪ ∩ … || |
| Logic symbols ∀ ∃ ∧ ∨ ¬ … || |
| Blackboard bold ℝ ℂ ℤ ℚ ℕ … || `\mathbb` Unicode math alphabets |
| Calligraphic 𝒜 ℬ 𝒞 … || `\mathcal` / `\mathscr` |
| Fraktur 𝔄 𝔅 ℭ … || `\mathfrak` upper and lower |
| AMS symbols || amssymb operators, relations, arrows, misc |

### 4.3 Accents and Decorations

| Capability | Status | Notes |
|---|---|---|
| `\hat \check \breve \acute \grave` || TeX placement, MATH attachment |
| `\tilde \bar \vec \dot \ddot` || `\vec` right-aligned |
| `\dddot \ddddot \mathring` || Combining triple/quad dots from STIX |
| `\widehat \widetilde` || Horizontal variants then assembly |
| `\overline \underline` || Rule at exact base width |
| `\overbrace \underbrace` || STIX brace glyphs + assembly; `^`/`_` as limits |
| `\overleftarrow \overrightarrow` || Extensible; under-arrows too |
| `\overleftrightarrow` and under form || Extensible |
| `\xrightarrow` / `\xleftarrow` || Optional `[under]{over}` labels |
| `\overset \underset` || Script-style, centered |
| `\stackrel` || Alias for `\overset` |
| `\cancel \bcancel \xcancel \cancelto` || SVG `<line>` diagonals |
| `\boxed` / `\fbox` || Stroked frame, 3mu pad |

### 4.4 Text and Font Styles

| Capability | Status | Notes |
|---|---|---|
| `\mathrm \mathbf \mathit` || Unicode math alphabets through STIX |
| `\mathsf \mathtt \mathbb` || Full Latin; digits where Unicode defines them |
| `\mathcal \mathfrak \mathscr` || Script exceptions (ℒ, ℋ, …); fraktur upper and lower |
| `\text{}` || Text mode inside math |
| `\boldsymbol \pmb` || Bold italic Greek/Latin; `\pmb` is a true overlay |
| `\operatorname{}` || Named operators in `\mathrm` |

### 4.5 Spacing

| Capability | Status | Notes |
|---|---|---|
| Automatic inter-atom spacing || TeXbook Table 18 (`golds/layout.toml` `ord-bin-text`, `ord-rel-text`, script drop) |
| `\,` thin space || Parse + layout dims (`golds/parse.toml`, `golds/layout.toml`) |
| `\:` medium space || `golds/parse.toml` `space_med`; 4 mu in layout |
| `\;` thick space || `golds/parse.toml` `space_thick`; 5 mu in layout |
| `\!` negative thin space || `golds/parse.toml` `space_neg`; −3 mu in layout |
| `\quad \qquad` || 1 em / 2 em (`golds/layout.toml` `quad`, `golds/parse.toml`) |
| `\hspace{}` || Em units (`golds/parse.toml` `hspace`) |
| `\phantom \vphantom \hphantom` || Empty / height-only / width-only (`golds/parse.toml`) |

### 4.6 Named Operators

| Capability | Status | Notes |
|---|---|---|
| `\sin \cos \tan \cot \sec \csc` || `\mathrm` operators (`golds/parse.toml` `op_*`) |
| `\arcsin \arccos \arctan` || `golds/parse.toml` |
| `\sinh \cosh \tanh \coth` || `golds/parse.toml` |
| `\log \ln \lg \exp` || `golds/parse.toml` |
| `\lim \limsup \liminf` || `\lim` is `MathNode::Limit`; others named ops (`golds/parse.toml`) |
| `\sup \inf \max \min` || `golds/parse.toml` |
| `\det \dim \ker \deg` || `golds/parse.toml` |
| `\gcd \lcm` || `golds/parse.toml` |
| `\Pr \arg` || `golds/parse.toml` |

### 4.7 Multiline and Display

| Capability | Status | Notes |
|---|---|---|
| Display math centering || Display style; `gather` centers each row (`golds/envs.toml`). Snippet output is tight-boxed, not page-centered. |
| Equation numbering || `\tag{}` / `\tag*{}`; `NumberingConfig` in `layout/` (`golds/envs.toml`) |
| `\begin{equation}` || Display + number (or `\nonumber`) |
| `\begin{align}` || RL alignment; per-row numbers |
| `\begin{gather}` || Centered rows; per-row numbers |
| `\begin{multline}` || First left, last right, middle center |
| `\begin{split}` || Same alignment as `aligned`; number from enclosing `equation` |
| `\substack` || Script-style centered stack |
| `\intertext` || Full-width text row in `align` |
| `\nonumber \notag` || |
| `\label \ref` || Two-pass on one tree; state survives `layout_with_numbering` |

### 4.8 Color

Color is in scope for v1.0 (Milestone 8). Channel math uses `Dim` — never hardware `f32`/`f64`. An unsupported model or unknown name is `Err(Unsupported)`, never a silent default color.

| Capability | Status | Notes |
|---|---|---|
| `\color{name}` || Named color — affects all following content in scope |
| `\textcolor{name}{expr}` || Color applied to expression only |
| `\colorbox{name}{expr}` || Background color box around expression |
| `\fcolorbox{border}{bg}{expr}` || Framed color box (fill + border stroke) |
| `\definecolor{name}{model}{spec}` || Custom color definition; forward refs are `Err` |
| Named colors (standard LaTeX set) || black white red green blue cyan magenta yellow + dvipsnames set |
| RGB color model `{rgb}{r,g,b}` || Values 0.0–1.0 via `Dim` |
| RGB integer model `{RGB}{R,G,B}` || Values 0–255 via `Dim` |
| HTML hex color model `{HTML}{RRGGBB}` || 6-digit hex |
| CMYK color model `{cmyk}{c,m,y,k}` || Values 0.0–1.0 via `Dim`; naive `(1-c)(1-k)` to sRGB |
| Gray model `{gray}{g}` || Value 0.0–1.0 via `Dim` |
| Color inheritance / scope || Color scoped to current group `{}` |
| SVG fill / stroke emission || `fill` and `stroke` on `<g>`; boxes as `<rect>` |
| PNG color pass-through || tiny-skia `Paint` from `Color::to_rgba8` (`golds/png.toml`) |
| egui color pass-through || `Color32` on meshes and rects (`golds/egui.toml`) |
| Unsupported color model || Returns `Err(Unsupported)` — never a fake color |

---

## 5. What latex-rust Does Not Do

These are explicitly out of scope. They return `Err(Unsupported)` — never a fake render.

- Text mode LaTeX (document structure, `\section`, `\begin{document}`)
- TikZ / PGF graphics
- Chemistry notation (`\ce{}`) — separate crate
- BibTeX / bibliography
- PDF output (separate crate)
- Font substitution / fallback synthesis
- Right-to-left math

Unsupported color *models* (for example `spot`) and unknown color names return `Err(Unsupported)`. They are not out of scope as a feature — they are honest failures inside the color system (see §4.8).

---

## 6. Gold Test Standard

Every capability entry in §4 that is marked ✅ must have a corresponding gold test.

A gold test for latex-rust specifies:
- Input LaTeX string
- Expected SVG output hash OR pixel-level comparison
- Expected box dimensions (width, height, depth) at reference size
- Expected parse success or named error

Gold format:
```toml
[[gold]]
name = "frac_simple"
input = "\\frac{1}{2}"
kind = "svg"
box_width_mu  = "10.5"
box_height_mu = "12.3"
box_depth_mu  = "4.1"
svg_hash = "sha256:abc123..."
```

Color golds (hex is the contract until SVG lands; SVG golds then lock `fill`/`stroke`):

```toml
[[gold]]
name = "textcolor_red_x"
input = "\\textcolor{red}{x}"
kind = "svg"
notes = "x glyph path has fill:#ff0000"

[[gold]]
name = "color_scope"
input = "{\\color{blue} x + y} + z"
kind = "svg"
notes = "x and y blue, z default color"

[[gold]]
name = "definecolor_custom"
input = "\\definecolor{mygreen}{rgb}{0.0,0.6,0.0}\\textcolor{mygreen}{f(x)}"
kind = "svg"
notes = "custom rgb color applied correctly"

[[gold]]
name = "colorbox_expression"
input = "\\colorbox{yellow}{\\frac{1}{2}}"
kind = "svg"
notes = "yellow background box around fraction"

[[gold]]
name = "unsupported_color_model"
input = "\\definecolor{x}{spot}{0.5}"
kind = "error"
expect = "Unsupported"
notes = "spot color model not supported — never a fake color"
```

Rules:
- Gold is the contract. Code must pass gold. Gold is never changed to pass code.
- A render that differs by one pixel from gold is a failure.
- A parse that returns a different error than gold is a failure.
- No capability is marked ✅ without a passing gold.

---

## 7. Shipped surface

Each milestone ends with a full gold suite pass before the next begins.

### Milestone 1 — Core Infrastructure
- [x] Crate scaffolding (`latex-rust`, dual license, GitHub)
- [x] `Dim` type (exact rationals) for layout math
- [x] Font metric loader (STIX Two Math)
- [x] `MathBox` type and basic composition
- [x] Parser skeleton — tokenizer only
- [x] Gold runner infrastructure
- [x] Math symbol catalog (`data/symbols.tsv`)
- [x] Color model parser + named/dvipsnames table (spec in §4.8; SVG in Milestone 8)

### Milestone 2 — Parser Complete
- [x] Full tokenizer
- [x] `MathNode` AST complete
- [x] Parser produces correct AST for all §4 node types
- [x] `ParseError` for all unsupported input
- [x] Gold tests for every node type

### Milestone 3 — Layout Engine
- [x] Style machine (display / text / script / scriptscript / cramped)
- [x] Atom spacing table (TeX Appendix G)
- [x] Fraction layout
- [x] Radical layout (vinculum)
- [x] Sub/superscript layout
- [x] Delimiter sizing
- [x] Operator limits placement
- [x] Matrix layout
- [x] Gold tests for layout dimensions on every node type

### Milestone 4 — SVG Renderer
- [x] Glyph path extraction from TrueType
- [x] Box → SVG transform
- [x] Self-contained SVG output
- [x] Extensible delimiter rendering
- [x] Gold tests for SVG output on representative expressions

### Milestone 5 — Symbol Coverage
- [x] Full Greek alphabet
- [x] Full AMS symbol set
- [x] Blackboard bold, calligraphic, fraktur
- [x] All named operators
- [x] Gold tests for every symbol category

### Milestone 6 — Accents and Decorations
- [x] All single-char accents
- [x] Extensible accents
- [x] Overbrace / underbrace
- [x] Overline / underline
- [x] Gold tests for all accent types

### Milestone 7 — Advanced Structures
- [x] Multiline environments (align, gather, multline)
- [x] Equation numbering
- [x] Cases environment
- [x] Gold tests for all environments

### Milestone 8 — Color Support
- [x] Color model parser — named, rgb, RGB 0–255, HTML hex, cmyk, gray (`parse_color_spec`, golds)
- [x] Standard named color table — 8 LaTeX names + 68 dvipsnames (`data/dvipsnames.tsv`)
- [x] `\definecolor` custom color registration (`ColorTable::define`)
- [x] Color AST nodes — `Color`, `TextColor`, `ColorBox`, `FColorBox` (`golds/parse.toml`)
- [x] Color scope propagation through layout engine
- [x] SVG renderer — `fill` and `stroke` attribute emission on colored glyphs
- [x] PNG renderer — tiny-skia color pass-through (Milestone 9; `Color::to_rgba8`)
- [x] egui renderer — `Color32` emission (Milestone 10; `Color::to_rgba8`)
- [x] Gold tests for every color capability (hex / tokenize / parse AST / layout color boxes / SVG `fill`/`stroke` / PNG / egui locked)
- [x] Full corpus pass before Milestone 9

### Milestone 9 — PNG Renderer (feature = "png")
- [x] tiny-skia integration
- [x] DPI-aware rasterization
- [x] Gold tests for pixel output

### Milestone 10 — egui Renderer (feature = "egui")
- [x] egui Shape emission
- [x] Zero SVG intermediate
- [x] Integration test with egui test harness
- [x] Gold tests for shape output

### Milestone 11 — Polish and Release
- [x] Full documentation (rustdoc on every public item)
- [x] README with examples
- [x] CHANGELOG
- [x] Benchmarks vs KaTeX reference renders
- [x] crates.io

---

## 8. Dependencies

| Crate | Purpose | Optional |
|---|---|---|
| `ttf-parser` | TrueType glyph extraction | No |
| `tiny-skia` | PNG rasterization | Yes (feature = "png") |
| `egui` | egui primitive emission | Yes (feature = "egui") |

Color uses these crates only: CSS `fill`/`stroke` strings in SVG, `tiny-skia` color when the `png` feature is on, `egui::Color32` when the `egui` feature is on. No extra dependency.

No other dependencies. No JavaScript. No webview. No runtime.

---

## 9. Performance Targets

| Operation | Target |
|---|---|
| Parse `\frac{a+b}{c+d}` | < 50µs (measured ~2µs for `\frac{1}{2}`) |
| Layout full display equation | < 500µs (measured ~47µs) |
| SVG render full display equation | < 1ms (measured ~951µs) |
| PNG render at 144dpi | < 5ms (measured ~142µs) |
| egui inline cache miss | < 2ms (measured ~216µs) |

KaTeX cold start in a browser is typically 200-400ms. latex-rust target is < 10ms including font loading.

---

## 10. Correctness Standard

- No hardware float (`f32` / `f64`) in any layout calculation
- All dimension arithmetic uses in-tree exact-rational `Dim`
- Font metrics stored and computed in `Dim`
- TeX Appendix G spacing table implemented exactly
- Unsupported input always returns `Err(Unsupported)` — never a fake render
- Color channels are `Dim` (or integer hex). Unsupported color models never synthesize a color
- A wrong render is worse than `Err(Unsupported)`

---

## 11. Licensing

latex-rust is MIT OR Apache-2.0. It is a standalone crate.

The font data (STIX Two Math, Latin Modern Math) is OFL licensed and may be embedded in the compiled binary.

---

## 12. Contact and Development

latex-rust is developed as a standalone open source contribution to the Rust ecosystem.

Issues, PRs, and capability requests tracked via the repository issue tracker.

No alpha or beta period. Ship when the gold suite is complete and green.

---

*This document is the engineering source of truth. A capability not listed here is not in the crate. A capability listed here without a gold is not complete.*