This experiment demonstrates inline math, a displayed sum, an aligned environment, and nested expressions in the isolated Quartz sandbox. Its latex transformer selects KaTeX; the source presents formulas as Markdown rather than asking authors to hand-write mathematical HTML. The examples below show the actual delimiters and expressions while keeping this documentation page separate from the live rendering demonstration.

Active configuration, copied verbatim from /home/loca/dev/quartz-sandbox/sandbox/engine/quartz.config.yaml, lines 126–130:

  - source: "@quartz-community/latex"
    enabled: true
    options:
      renderEngine: katex
    order: 80

The following contiguous content excerpt is copied from /home/loca/dev/quartz-sandbox/sandbox/vault/experiments/latex-katex.md, lines 32–43. Those same expressions are used in its rendered-result section at lines 48, 52–54, and 58–63.

Inline: the sandbox serves $n = 1$ site while the shared engine serves $n = 51$.
 
$$
T_\text{total} = \sum_{i=1}^{n} \left( t_\text{parse}^{(i)} + t_\text{render}^{(i)} \right)
$$
 
$$
\begin{aligned}
  \text{isolation} &= \text{checkout} \times \text{node\_modules} \times \text{config} \\
                   &\quad \times \text{dist} \times \text{port}
\end{aligned}
$$

The fraction and matrix are also real rendered-example content, copied contiguously from the same source file, lines 67–71:

$$
P(\text{regression}) = \frac{\text{sandbox builds}}{\text{sandbox builds} + \text{shared builds}}
\qquad
M = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}
$$

These are typesetting fixtures, not measured build-cost or regression-probability models.

What the rendered output proves

Live sandbox page: https://quartz.loca.zone/experiments/latex-katex.html

The prior capture in /home/loca/dev/quartz-sandbox/evidence/2026-09-15-quartz-migration-f1fd35c3/sandbox-experiments.json classifies LaTeX with KaTeX with this literal proof_markers object:

{"katex_class":6}

Its rendered_proof.routes entry records 47,505 DOM bytes, clipboard_button: 2, syntax_figures: 2, and reading_stats: 1. This is prior-capture evidence from the built release dist-1789511778, captured using Chrome through http://127.0.0.1:51963.

katex_class: 6 is a receipt marker counter, not a count of actual KaTeX DOM elements: broad string matches can include quoted source examples. It does not separately count display wrappers or MathML trees, so those stronger checks must not be inferred from this counter alone. The source describes build-time output, but this receipt’s browser capture is not a JavaScript-disabled test, a screen-reader test, or a measurement of layout stability. Clipboard-button presence likewise does not show that a clipboard operation succeeded.

Safe for the shared engine?

Recorded assessment: safe_for_shared_engine: true.

Receipt reason, verbatim:

Pages without math are unaffected and the plugin already ships the only global KaTeX stylesheet cost.

A true verdict does not authorize a shared-engine change. Any requirement to modify /home/loca/dev/quartz/quartz must be reported as a BLOCKER, not performed as an action. This is the receipt’s assessment, not authorization to change the engine shared by 51 wikis or a new performance measurement.

Try it in the sandbox

After editing only authorized sandbox content or configuration, use the isolated wrapper:

cd /home/loca/dev/quartz-sandbox/sandbox && ./build.sh

The wrapper /home/loca/dev/quartz-sandbox/sandbox/build.sh pins the isolated engine to commit 3dff48b5df6d84c9544a5ae19c8f2cbb01dc44e5 and takes a nonblocking .build.lock; a competing build is rejected instead of overlapping. It runs install-plugins before bootstrap-cli.mjs build, with --directory pointing to /home/loca/dev/quartz-sandbox/sandbox/vault and --output pointing to a new timestamped /home/loca/dev/quartz-sandbox/sandbox/dist-<timestamp> directory. It checks for index.html before atomically replacing current. The origin sees the new release on the next request without a restart.

Recorded runtime invocation from sandbox-runtime.json, reference only:

PATH=/usr/bin:/bin PORT=51947 SANDBOX_ROOT=/home/loca/dev/quartz-sandbox/sandbox/current NODE_ENV=production /usr/bin/node /home/loca/dev/quartz-sandbox/sandbox/serve.mjs

The production service already owns port 51947. Do not start a second process or restart the service. The runtime receipt describes an earlier supervised process and release-swap proof, not an instruction to launch another server. No sandbox rebuild or service change was performed to author this documentation.

index