Sarmate.net Sarmate.net
Home Features Pricing Documentation Contact
Log in Sign up
Scientific web 9 min

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.

AttributeValuesDescription
targetid of the target elementRequired. If the id is missing, the reference renders as [id?].
formatnumber · label · name · fullDisplay format: «3» (number, default) · «Theorem» (label) · «Pythagoras» (name) · «Theorem 3 — Pythagoras» (full).
HTML
<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]$ …
References from many places You can reference the same 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>

AttributeValuesDescription
stylenumeric · author-year · alphaCitation marker style. numeric [1], author-year (Lang 2002), alpha [Lan02].
titlefreeSection title. Default: «References».

Entry <mp-cite-entry>

One entry per work. Can be written self-closing (<mp-cite-entry … />).

AttributeValues
idRequired. Citation key (e.g. hardy1908).
typearticle · book · misc · thesis (default misc)
authorFree string (comma-separated surnames recommended).
title, year, journal, publisher, volume, number, pages, editionClassic bibliographic fields.
url, doiExternal 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

HTML
<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>
Automatic back-jumps When the student clicks an inline citation, the page scrolls to the bibliography and the entry briefly flashes. Next to it, a small back-arrow takes them right where they had clicked — even across several chapters.

<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{...}.

HTML
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>:

AttributeValues
footnotes-collectauto (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.

HTML
<h2>List of figures</h2>
<mp-lof/>

<h2>List of tables</h2>
<mp-lot/>
Related: <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.