documenteer.citations#

documenteer.citations Module#

Composition of bibliographic citations for Documenteer-built sites.

Documenteer renders citations in several places — a technote’s “Citing this document” section and BibTeX copy control, a user guide’s citation card and footer — and every one of them composes the same bibliographic record. This module is the single implementation those surfaces share: a Citation value object with to_plain_text and to_bibtex composers, the identifier normalizers that give every DOI, ORCID, and ROR in Documenteer the same spelling, and the schema.org JSON-LD composer that makes a guide a machine-readable DOI landing page.

Composition is local and deterministic. Nothing here touches the network, so the same metadata always yields byte-identical output during a Sphinx build.

Functions#

compose_landing_page_jsonld(citations, *[, ...])

Compose a site's citations as a schema.org JSON-LD document, serialized ready to embed in a <script type="application/ld+json"> element.

doi_url(doi)

Express a DOI as a resolvable https://doi.org URL.

normalize_doi(value)

Normalize a DOI into its bare form, 10.NNNN/suffix.

normalize_orcid(value)

Reduce an ORCID URL to its bare identifier.

orcid_url(value)

Express an ORCID as a resolvable https://orcid.org URL.

ror_url(value)

Express a ROR identifier as a resolvable https://ror.org URL.

Classes#

BibtexEntryType(*values)

The BibTeX entry type to compose a citation as.

Citation(*, title[, doi, authors, ...])

A bibliographic citation for a work, composable as plain text or BibTeX.

GuideCitation(*, citation[, label, is_self, ...])

A citation a user guide displays, together with how the guide presents it.

OrganizationAuthor(*, name[, ror])

An organization credited as an author of a cited work.

PersonAuthor(*, family_name[, given_name, ...])

A person credited as an author of a cited work.

Class Inheritance Diagram#

Inheritance diagram of documenteer.citations.BibtexEntryType, documenteer.citations.Citation, documenteer.citations.GuideCitation, documenteer.citations.OrganizationAuthor, documenteer.citations.PersonAuthor