Help:Cite messages
![]() | This help page is a how-to guide. It details processes or procedures of some aspect(s) of Wikipedia's norms and practices. It is not one of Wikipedia's policies or guidelines, as it has not been thoroughly vetted by the community. |
![]() | This is a very technical how-to mainly of interest to editors who work with the footnotes system and related templates |
The Wikipedia footnotes system uses the Cite.php software extension to generate references. MediaWiki messages are then used to format the display of the inline links and the references.
Elements
- Inline link: the link shown by the content enclosed in
<ref>...</ref>
; shown in superscript and enclosed in brackets; coded in the MediaWiki message as $2 - Backlink: the link shown in the references section; a single link is shown as a caret; coded as $2
- Backlink label: multiple backlinks are shown as a caret followed alpha character labels
- ID: a unique HTML ID that does not show; coded as $1
- Reference content: the content enclosed in
<ref>...</ref>
that shows in the reference list; coded as $3
Messages
MediaWiki interface page | Use | Current |
---|---|---|
Cite reference link | format inline link | <syntaxhighlight lang="text" class="" id="" style="" inline="1">[$3]</syntaxhighlight>
|
Cite references link many | format reference with multiple backlinks | <syntaxhighlight lang="text" class="" id="" style="" inline="1">
|
Cite references link many and | <syntaxhighlight lang="text" class="" id="" style="" inline="1"> </syntaxhighlight> | |
Cite references link many format | <syntaxhighlight lang="text" class="" id="" style="" inline="1">$3</syntaxhighlight>
| |
Cite references link many format backlink labels | backlink labels used in the reference list | currently from a to azz |
Cite references link many sep | <syntaxhighlight lang="text" class="" id="" style="" inline="1"> </syntaxhighlight> | |
Cite references link one | format reference with single backlink | <syntaxhighlight lang="text" class="" id="" style="" inline="1">
|
Cite references prefix | prefix for <references /> |
<syntaxhighlight lang="text" class="" id="" style="" inline="1">MediaWiki:Cite references prefix</syntaxhighlight> |
Cite references suffix | suffix for <references /> |
<syntaxhighlight lang="text" class="" id="" style="" inline="1">MediaWiki:Cite references suffix</syntaxhighlight> |
Cite reference link key with num | <syntaxhighlight lang="text" class="" id="" style="" inline="1">$1_$2</syntaxhighlight>
| |
Cite reference link prefix | inline link prefix | <syntaxhighlight lang="text" class="" id="" style="" inline="1">cite_ref-</syntaxhighlight> |
Cite reference link suffix | inline link suffix | <syntaxhighlight lang="text" class="" id="" style="" inline="1"></syntaxhighlight> |
Cite references link prefix | reference list link prefix | <syntaxhighlight lang="text" class="" id="" style="" inline="1">cite_note-</syntaxhighlight> |
Cite references link suffix | reference list link suffix | <syntaxhighlight lang="text" class="" id="" style="" inline="1"></syntaxhighlight> |
Cite references no link | <syntaxhighlight lang="text" class="" id="" style="" inline="1"> $2 </syntaxhighlight> | |
Cite references link many accessibility label | accessibility label for screen readers | <syntaxhighlight lang="text" class="" id="" style="" inline="1">Jump up to:</syntaxhighlight> |
Classes and CSS
Class .reference formats the inline link; defined in Common.css
<syntaxhighlight lang="css"> /* Ensure refs in table headers and the like aren't bold or italic */ sup.reference {
font-weight: normal; font-style: normal;
}
/* Prevent line breaks in silly places:
3) Ref tags with group names Cite error: A <ref>
tag is missing the closing </ref>
(see the help page).
Named [1]
Named reference used again [1]
Which shows as
Unnamed [1]
Named [2]
Named reference used again [2]
Which renders as
The MediaWiki messages are combined to form the HTML output
<syntaxhighlight lang="html">
Unnamed <a href="#cite_note-0" title="">[1]</a>
Named <a href="#cite_note-named-1" title="">[2]</a>
Named reference used again <a href="#cite_note-named-1" title="">[2]</a>
- <a href="#cite_ref-0" title="">^</a> This is an unnamed reference
- ^ <a href="#cite_ref-named_1-0" title="">a</a> <a href="#cite_ref-named_1-1" title="">b</a> This is a named reference
</syntaxhighlight>
If citation templates are used, they will inject other classes and ids into the HTML output.