Skip to content

Documents & Citations

A notebook is also a publishable document. Beyond code and prose it can carry academic front matter — a title block, an abstract, a bibliography — and cite sources inline. Every export target (article/report PDF, slide deck, HTML, a published site) reads the same authored metadata and places it correctly.

You author document metadata as ordinary cells carrying a role tag (set with the 🏷 tag editor or a token in the cell header), in natural reading order. Nothing is a special syntax — a title cell is just a markdown cell that the export hoists.

Front matter

Role tagThe cell becomesPlacement on export
titlethe title block: # Title, then ##/### subtitle, then the first plain line as bylinehoisted to the top
abstractan academic abstracthoisted into the title block
bibliographythe reference database (see below)not shown; drives citations + References
julia
#%% md id=fm title
# Spectral Methods for the Heat Equation
### A reproducible study
Ada Lovelace · Analytical Engine Lab

#%% md id=abs abstract
We compare Chebyshev and Fourier spectral discretizations on the 1-D heat
equation, and show the reactive notebook that produced every figure.

With no title cell, the document title falls back to the first markdown # H1, then the filename. The title block also feeds the PDF/HTML title, the published-site card, and the OG social-card metadata.

Bibliography

Tag a markdown cell bibliography. Its body is either embedded BibTeX or one-or-more .bib file paths (one per line, resolved relative to the notebook and copied into exports). One cell cannot hold both: a cell containing any @entry{…} is read as embedded BibTeX and its path lines are ignored. To use both, write two bibliography cells.

julia
#%% md id=bib bibliography
@book{knuth1984,
  author = {Donald E. Knuth},
  title  = {The TeXbook},
  year   = {1984},
  publisher = {Addison-Wesley}
}

#%% md id=bibfile bibliography
references.bib

In the live notebook, the bibliography renders an adaptive references card listing your entries, with the keys you've actually cited highlighted.

Citing in prose

Cite a bibliography key from any markdown cell. Typing [@ autocompletes keys.

FormRenders (numeric style)Use
[@knuth1984][1]a normal citation
[@knuth1984, pp. 33-35][1, pp. 33–35]with a page/locator
[@a; @b][1, 2]several at once
@knuth1984Knuth (1984)a prose (author–year) mention

The bare @key prose form only converts keys that are actually defined, so an email address or a stray @handle stays literal. On export, citations render linked to the References section and a References list is generated in your chosen style; the live notebook mirrors this with the references card.

Citation style

Set the citation style per notebook in Settings → Citation style (persisted as bibstyle in Settings, under This notebook):

ieee · apa · chicago-author-date · chicago-notes · mla · nature · vancouver · harvard-cite-them-right

The value is passed straight to Typst, so it has to be a name Typst knows. Harvard is harvard-cite-them-right; a bare harvard fails the export.

Numeric styles (IEEE, Nature, Vancouver) render [1] and order the References by first citation; author–date styles (APA, Chicago, MLA, Harvard) render (Knuth, 1984) and order alphabetically.

Figures

Tag a markdown cell caption and it captions the output of the cell above it, becoming a numbered figure on export (Figure N.). Give it a label= to cross-reference it, and for= to caption a cell other than the one directly above:

julia
#%% md id=cap1 caption label=scaling
Throughput against core count.

Refer to it from any markdown cell with [@fig:scaling], the same cross-reference machinery as citations. That renders as a link in the live notebook and as plain Figure N in the PDF.

Figures embed as vectors where possible (CairoMakie → PDF, ECharts → SVG) so they stay crisp in print. See Export and Charts & Tables.

From notebook to paper

Add a title cell, an abstract cell, and a bibliography cell; cite with [@key]; then Export → PDF (Report, two-column). The same notebook is your working analysis and the manuscript that reproduces it.