Front Matter

Document metadata is defined in TOML front matter, delimited by +++:

+++
title = "Document Title"
subtitle = "A Subtitle"
authors = ["Jane Doe", "John Smith"]
date = "2026-02-01"
keywords = ["markdown", "academic", "writing"]
institution = "University"

[macros]
R = "\\mathbb{R}"
N = "\\mathbb{N}"
vec = "\\mathbf{#1}"
norm = "\\left\\| #1 \\right\\|"

[bibliography]
path = "references.bib"
+++

Metadata Fields

FieldTypeDescription
titleStringDocument title
subtitleStringDocument subtitle
authorsArrayList of author names
dateStringPublication date
keywordsArrayDocument keywords
institutionStringAffiliated institution

Custom Macros

Define LaTeX macros in the [macros] section. Macros can take arguments using #1, #2, etc.:

[macros]
R = "\\mathbb{R}"           # \R expands to \mathbb{R}
vec = "\\mathbf{#1}"        # \vec{x} expands to \mathbf{x}
inner = "\\langle #1, #2 \\rangle"  # Two arguments

Mathematics

Inline math uses single dollar signs, display math uses double:

TypeSyntaxResult
Inline $E = mc^2$ \(E = mc^2\)
Display $$\int_0^1 x\,dx$$ \[\int_0^1 x\,dx = \frac{1}{2}\]
Labeled $$...$$ {#eq:label} Numbered, referenceable equation

Labeled Equations

Add labels to reference equations elsewhere in the document:

The Gaussian integral is given by:

$$
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
$$ {#eq:gaussian}

As shown in @eq:gaussian, the result is $\sqrt{\pi}$.

Using Custom Macros

Macros defined in front matter expand in all math contexts:

For all $x \in \R$, we have $\norm{x} \geq 0$.

Citations

Citations use bracket syntax with BibTeX keys:

SyntaxDescriptionOutput Style
[@knuth1984]Single citation[1] or (Knuth, 1984)
[@knuth1984; @lamport1994]Multiple citations[1, 2]
[@knuth1984, p. 42]With page locator[1, p. 42]
[@knuth1984, Ch. 3]With chapter locator[1, Ch. 3]
[@knuth1984, pp. 42-45]Page range[1, pp. 42-45]

Bibliography

Specify a BibTeX file in the front matter:

+++
[bibliography]
path = "references.bib"
+++

A bibliography is automatically generated from cited works at the end of the document.

BibTeX Example

@book{knuth1984,
    author = {Donald E. Knuth},
    title = {The TeXbook},
    publisher = {Addison-Wesley},
    year = {1984}
}

@article{lamport1994,
    author = {Leslie Lamport},
    title = {LaTeX: A Document Preparation System},
    journal = {Addison-Wesley},
    year = {1994}
}

Cross-References

Label elements with {#label} and reference them with @label:

# Introduction {#sec:intro}

See @sec:intro for the introduction.

$$E = mc^2$$ {#eq:einstein}

Equation @eq:einstein shows mass-energy equivalence.

::: theorem {#thm:fermat}
There are no positive integers $a$, $b$, and $c$ that satisfy 
$a^n + b^n = c^n$ for any integer $n > 2$.
:::

By @thm:fermat, we conclude...

Label Conventions

Labels conventionally use prefixes to indicate type:

PrefixUse ForExample
sec:Sections{#sec:intro}
eq:Equations{#eq:euler}
thm:Theorems{#thm:main}
lem:Lemmas{#lem:helper}
def:Definitions{#def:group}
fig:Figures{#fig:diagram}
tab:Tables{#tab:results}
alg:Algorithms{#alg:sort}

Automatic Numbering

Referenced elements are automatically numbered. When referencing, the number is inserted automatically:

  • @sec:intro → "Section 1"
  • @eq:euler → "Equation (1)"
  • @thm:main → "Theorem 1"

Environments

Environments use fenced blocks with ::::

::: theorem {#thm:main}
For every $\epsilon > 0$, there exists $\delta > 0$ such that
$|x - a| < \delta$ implies $|f(x) - f(a)| < \epsilon$.
:::

::: proof
By construction, choose $\delta = \epsilon / 2$. Then for 
$|x - a| < \delta$, we have...
:::

::: definition {#def:continuous}
A function $f$ is **continuous** at $a$ if the limit of $f(x)$ 
as $x$ approaches $a$ equals $f(a)$.
:::

Supported Environments

EnvironmentAliasesNumberedNotes
theoremthmYes
lemmalemYes
propositionpropYes
corollarycorYes
definitiondefYes
exampleexYes
remarkremYes
proofpfNoEnds with ∎
figurefigYesLast paragraph is caption
tabletabYes
algorithmalgoYes
abstractNoDocument abstract
noteNoCallout box
warningNoWarning callout

Figures

The last paragraph in a figure environment becomes the caption:

::: figure {#fig:results}
![](chart.png)

Experimental results showing convergence over 100 epochs.
:::

Footnotes

Two styles of footnotes are supported:

Inline Footnotes

This is some text with an inline footnote^[The footnote content 
appears right here in the source].

Reference-Style Footnotes

This is some text with a reference footnote[^1].

Later in the document, another footnote[^longnote].

[^1]: Short footnote content.

[^longnote]: Longer footnote that can span multiple lines.
    Indented lines are included in the footnote.
    
    Even multiple paragraphs work.

Table of Contents

Insert a table of contents with:

[[toc]]

The TOC is automatically generated from all headings in the document. Each entry links to its corresponding section.

Tables

Standard Markdown pipe tables with optional captions and labels:

| Model    | Accuracy | F1 Score |
|----------|:--------:|---------:|
| Baseline | 0.82     | 0.79     |
| Proposed | 0.91     | 0.88     |
| Ensemble | 0.93     | 0.91     |

Table: Performance comparison on the test set. {#tab:results}

Column Alignment

  • :--- or --- — Left aligned (default)
  • :---: — Center aligned
  • ---: — Right aligned

Reference tables with @tab:results.

Other Extensions

Subscript and Superscript

H~2~O is water.     # Subscript: Hâ‚‚O
x^2^ is x squared.  # Superscript: x²

Small Caps

[sc]Small Caps Text[/sc]

Description Lists

Term One
: Definition of term one.

Term Two
: Definition of term two.
: Second paragraph for term two.

Page Breaks

---pagebreak---

Appendix Marker

Mark the start of appendices (affects numbering):

---appendix---

# Appendix A {#app:proofs}

Detailed proofs go here.