You need Quarto 1.9 or newer and the gp executable on your PATH. See Get started.
What you get
Execution.`` cells run in onegpsession per document, so state carries from cell to cell, exactly as it would at thegp` prompt.
Highlighting. A syntax definition covering the full function set of PARI/GP 2.17, applied automatically — nothing to configure. The engine itself works with gp 2.13 and newer.
Figures. Plots exported as SVG become real figures, with captions and cross-references. See Figures.
Errors that behave. A PARI/GP error stops the render and tells you which cell, unless you asked for the error to be part of the document.
A taste
The class number and regulator of \(\mathbb{Q}(\sqrt[3]{2})\):
K =bnfinit(x^3-2, 1);[K.no, K.reg]
[1, 1.3473773483293841009181878914456530463]
And because the session persists, its fundamental units are still one cell away: