References and bibliography
Four tools: internal cross-references to a numbered element (theorem, figure, table), external citations to the bibliography, footnotes, and auxiliary lists of figures and tables.
<mp-ref> — internal cross-references
References any element with an id that mathpad has numbered (chapter, section, definition, theorem, property, exercise, figure, table…). The reference displays the current number, the click jumps to the element.
| Attribute | Values | Description |
|---|---|---|
| target | id of the target element | Required. If the id is missing, the reference renders as [id?]. |
| format | number · label · name · full | Display format: «3» (number, default) · «Theorem» (label) · «Pythagoras» (name) · «Theorem 3 — Pythagoras» (full). |
<mp-theorem id="thm-tvi">
<mp-title>Intermediate value theorem</mp-title>
…
</mp-theorem>
… By <mp-ref target="thm-tvi" format="full"></mp-ref>, there exists $c \in [a;b]$ …
id as many times as you like. The number is computed automatically from the context (position in the chapter/section), so inserting a new theorem cleanly updates all subsequent references — no manual maintenance. Bibliography
Three related tags work together: <mp-bibliography> as the container, <mp-cite-entry> for each entry, <mp-cite> for an inline citation.
Container <mp-bibliography>
| Attribute | Values | Description |
|---|---|---|
| style | numeric · author-year · alpha | Citation marker style. numeric [1], author-year (Lang 2002), alpha [Lan02]. |
| title | free | Section title. Default: «References». |
Entry <mp-cite-entry>
One entry per work. Can be written self-closing (<mp-cite-entry … />).
| Attribute | Values |
|---|---|
| id | Required. Citation key (e.g. hardy1908). |
| type | article · book · misc · thesis (default misc) |
| author | Free string (comma-separated surnames recommended). |
| title, year, journal, publisher, volume, number, pages, edition | Classic bibliographic fields. |
| url, doi | External link. doi takes precedence (rendered as https://doi.org/<doi>). |
Inline citation <mp-cite>
A single attribute, ref, pointing to the id of a <mp-cite-entry>. Can be self-closing.
Complete example
<p>The proof is attributed to Hardy <mp-cite ref="hardy1908"/>.</p>
<p>Lang <mp-cite ref="lang2002"/> gives a modern version.</p>
<mp-bibliography style="numeric">
<mp-cite-entry id="hardy1908" type="article"
author="Hardy, G. H." title="Mendelian proportions in a mixed population"
journal="Science" volume="28" year="1908" pages="49–50"/>
<mp-cite-entry id="lang2002" type="book"
author="Lang, S." title="Algebra" publisher="Springer"
edition="3" year="2002" doi="10.1007/978-1-4613-0041-0"/>
</mp-bibliography>
<mp-footnote> — footnotes
Inline note, replaced in place by a small call ¹, whose content is gathered at the bottom of the chapter or document. Behaves like LaTeX \footnote{...}.
The Cauchy formula<mp-footnote>Today usually attributed to Cauchy-Schwarz.</mp-footnote> spreads after 1821.
You can tune the grouping strategy on <mp-course>:
| Attribute | Values |
|---|---|
| footnotes-collect | auto (default) · chapter · document |
auto picks chapter if there is at least one <mp-chapter>, otherwise document. Handy when moving from a single-block course to a structured one.
<mp-lof> and <mp-lot> — auxiliary lists
Both are self-closing. <mp-lof/> collects every <mp-figure> with a caption, <mp-lot/> every .tp-table (produced by the converter from tabular). Like \listoffigures / \listoftables in LaTeX.
<h2>List of figures</h2>
<mp-lof/>
<h2>List of tables</h2>
<mp-lot/>
<mp-toc/>
The table of contents works on the same principle — see Document structure. Ready to try mathpad?
Create your first interactive scientific HTML document in the online editor, or import your existing LaTeX course in one click.