Foreign formal-language content a DSL owns — mathematics and code, embedded when small and exhibited when large.
<align>Semantic role: align. Compiles to eHTML <align>.
Registers:
- Canonical:
<align>
<align>
x^2 + y^2 &= z^2 \\
a + b &= c
</align>
Two aligned equations. The & marks the alignment column (here,
the = sign). Handler wraps in \begin{aligned}...\end{aligned}
(KaTeX-compatible variant of LaTeX’s align).
<cases>Semantic role: cases. Compiles to eHTML <cases>.
Registers:
- Canonical:
<cases>
<cases>
x^2 & \text{if } x \ge 0 \\
-x^2 & \text{if } x < 0
</cases>
A two-case piecewise definition. Handler wraps in
\begin{cases}...\end{cases}.
<code>Semantic role: code. Compiles to eHTML <code>.
Registers:
- Canonical:
<code>
The function is `factorial`.
The function is factorial.
Plain markdown backticks produce inline <code>. The most common authoring path.
Use `<`code`>` for inline code.
Use <code> for inline code.
The enscribe sigil form. Equivalent to plain markdown backticks but supports attributes.
<code language=python | def hello(): print("hi")>
def hello(): print("hi")
<code #factorial-impl language=python | def factorial(n):>
def factorial(n):
| attribute | kind | values / default | notes |
|---|---|---|---|
language |
kwarg | The programming language of the code. | |
src |
kwarg | An @id reference (#313 consumer wiring) that pulls a stored <dataset> declared in <data> and renders its opaque bytes as the verbatim code body — e.g. |
<code-block>Semantic role: code-block. Compiles to eHTML <code-block>.
Registers:
- Canonical:
<code-block>
<``` python | print("hello, world") ```>
print("hello, world")
The triple-backtick sigil. The first positional token is the
language (emitted as a language-X class on the <code>); the pipe
separates it from the verbatim, whitespace-preserving content — the
pipe-form padding (the spaces around the content) is KEPT, since
whitespace in code is significant and visible to the reader. (#327)
<``` this is all content ```>
this is all content
The no-pipe form: the entire body is opaque content with no language extraction.
| attribute | kind | values / default | notes |
|---|---|---|---|
src |
kwarg | An @id reference (Option A / #313) that pulls a stored <dataset> declared in <data> and renders its opaque bytes as the code block’s verbatim body — e.g. |
<display-math>Semantic role: display-math. Compiles to eHTML <display-math>.
Registers:
- Canonical:
<display-math>
<$$ \sum_{i=1}^{n} x_i = X $$>
The $$ sigil. Display-mode LaTeX rendered by KaTeX on its own line;
numbered by default (the equation number is appended after the KaTeX
output).
| attribute | kind | values / default | notes |
|---|---|---|---|
+numbered / -numbered |
flag | default on | Whether this equation participates in the document-wide numbered sequence. |
<eqnarray>Semantic role: eqnarray. Compiles to eHTML <eqnarray>.
Registers:
- Canonical:
<eqnarray>
<eqnarray>
f(x) &=& x^2 \\
g(x) &=& 2x
</eqnarray>
Two equations rendered via KaTeX’s aligned env (the supported
equivalent of LaTeX’s eqnarray).
<inline-code>Semantic role: inline-code. Compiles to eHTML <inline-code>.
Registers:
- Canonical:
<inline-code>
Assign with <` x = 1 `> at the top of the function.
Assign with x = 1 at the top of the function.
The single-backtick sigil. With no pipe, the whole body is opaque code content rendered as <code> (the same output as a markdown backtick span). Whitespace in code is significant and preserved, so the pipe-form padding stays INSIDE the <code>. (#327)
Call <` python | factorial(n) `> to recurse.
Call factorial(n) to recurse.
The first positional token before the pipe is the language, emitted
as a language-X class on the <code> (discoverable by highlighters;
the interpreter applies no highlighting itself).
<inline-math>Semantic role: inline-math. Compiles to eHTML <inline-math>.
Registers:
- Canonical:
<inline-math>
The identity <$ a^2 + b^2 = c^2 $> holds for right triangles.
The identity
The $ sigil. Opaque LaTeX content rendered inline by KaTeX and
wrapped in <inline-math> for CSS targeting. The sigil carries no
attributes — id and classes are not supported for inline math.
<math>Semantic role: math. Compiles to eHTML <math>.
Registers:
- Canonical:
<math>
<math>
E = mc^2
</math>
Long-form <math> block. Semantically equivalent to the
<$$ E = mc^2 $$> display-math sigil — both render block-level
LaTeX math via KaTeX. Use the long-form when the source is
multi-line or when explicit tag bounds aid readability; use the
sigil for brevity.
<matrix>Semantic role: matrix. Compiles to eHTML <matrix>.
Registers:
- Canonical:
<matrix>
<matrix>
1 & 2 \\
3 & 4
</matrix>
A 2×2 matrix. The handler wraps the body in
\begin{matrix}...\end{matrix} before KaTeX renders.