Help:Contributing/citations

From Wikibase
Revision as of 12:25, 20 August 2026 by SeedBot (talk | contribs) (Cite-by-QID help page (issues #24/#25): {{#cite}} / {{#citations:}} parser functions (via create-page on MediaWiki MCP Server))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Languages: English · français · Esperanto

Cite a Wikibase item by its QID and the citation renders from the item graph — you never type the bibliographic metadata. Edit the source item once; every page that cites it updates. Every example below is live against real items.

The two parser functions

Function What it does Use it when
#cite Renders one citation for one or more items — inline, or inside a <ref> footnote. Quoting, footnoting.
#citations: Renders the page's bibliography: one entry per distinct source item. A "Sources" section.

Citing with #cite

Running example: Q95 (a book) and Q96 (a quotation that cites the book). The citation follows the item's class: a content item cites through its source statement, a source item cites itself.

You type You get
{{#cite:Q95}}
Lovelace, A. (1843). Notes by the Translator. In Notes by the Translator. R. & J. E. Taylor. https://doi.org/10.1000/notes
{{#cite:Q95|style=vancouver}}
[1]Lovelace A. Notes by the Translator. R. & J. E. Taylor; 1843. https://doi.org/10.1000/notes.
{{#cite:Q96}}
Lovelace, A. (1843). The Analytical Engine has no pretensions whatever to originate anything. In Notes by the Translator. R. & J. E. Taylor. https://doi.org/10.1000/notes
{{#cite:Q95|Q96}}
Lovelace, A. (1843). Notes by the Translator. In Notes by the Translator. R. & J. E. Taylor. https://doi.org/10.1000/notes

Lovelace, A. (1843). The Analytical Engine has no pretensions whatever to originate anything. In Notes by the Translator. R. & J. E. Taylor. https://doi.org/10.1000/notes

A citation follows the source, not the page. Q96's citation is the quotation itself (author, date, text) — its source book shows as the container. Multi-entity {{#cite:Q95|Q96}} puts both citations in one output — one footnote with several sources.

Footnotes

Wrap {{#cite}} in the stock Cite extension's <ref> and list the footnotes with <references/>:

You type You get
Ada was first.<ref>{{#cite:Q96}}</ref>
Ada was first.[1]
  1. ↑ Lovelace, A. (1843). The Analytical Engine has no pretensions whatever to originate anything. In Notes by the Translator. R. & J. E. Taylor. https://doi.org/10.1000/notes

Use <references/>, not {{reflist}}. The stock Cite extension on this wiki registers the <references/> tag; {{reflist}} only works if a Template:Reflist exists.

The Sources section: #citations:

Collects the distinct source items cited on the page — multiple quotes from one book collapse to one entry:

You type You get
{{#citations:}}
  1. Lovelace, A. (1843). Notes by the Translator. In Notes by the Translator. R. & J. E. Taylor. https://doi.org/10.1000/notes
{{#citations:Q95|Q96}}
  1. Lovelace, A. (1843). Notes by the Translator. In Notes by the Translator. R. & J. E. Taylor. https://doi.org/10.1000/notes

The trailing colon is required. {{#citations}} without the colon renders literally — the wiki reads it as an unknown template:

You type You get
{{citations}}
Template:Citations

Arguments

Both functions accept style and output as named arguments (or positionally, after the QIDs):

Argument Values Default
style apa, vancouver, json, bibtex, ris apa
output html, text html

Keep the items healthy

  • Sources are items with harvested metadata (DOI, publisher, pages, …) — create them with Special:AddSource.
  • Content items point at their source with a source statement (items and properties).
  • For an exact quote location, add a page(s) qualifier on the content item's source statement — it becomes the page number in the citation.
  • A missing or unknown item renders an error span, never a broken page.

How updates propagate

Editing a cited item re-renders every citing page automatically (through the job queue, usually within a few minutes). A page always renders the current state of its citations — there is no metadata to keep in sync by hand.

See also