Help:References
Shortcut H:REF |
On Bulbapedia, References (also known as Footnotes or Citations) are used to document an article's bibliographic citations to reliable sources, provide explanatory information, or source information for tables and other elements. This functionality is provided by the Cite extension to MediaWiki.
This page documents how Cite works in the Source Editor. For information on how to add references in VisualEditor, see Help:VisualEditor § Editing references.
This page does not cover the formatting of citations, which is outlined on Bulbapedia:Manual of style/References.
Overview
The References system shows two elements on the page:
- A Footnote marker is displayed in the article's content as a bracketed, superscripted number, letter, or word. Examples shown respectively are: [1][a][Note 1]. This footnote label is linked to the full footnote. Clicking on the footnote marker jumps the page down to the footnote and highlights the citation.
- A Footnote displays the full citation for the source. Together the footnotes are displayed in an ordered list wherever the reference list markup
{{reflist}}
is placed. Each entry begins with the footnote label in plain text. The entire reference list is formatted in a slightly smaller font.
- Each successive footnote label is automatically incremented. Thus the first footnote marker would be [1] the second would be [2] and so on. Custom labels are also incremented: [a][b][c], [Note 1][Note 2][Note 3].
- For a single-use footnote, the label is followed by a uparrow (↑) that is a backlink to the matching footnote marker. For example:
- 1. ↑ Citation
- If a named footnote is used in the text multiple times, then the footnote has multiple backlinks:
- 2. ↑ 2.0 2.1 2.3 Citation
References in action
The superscript numeral "1" in square brackets at the end of this sentence is an example of a footnote marker.[1]
- ↑ This is a footnote that contains a citation or note.
Ref tags
To create the footnote marker, determine the point in the page content where the marker is desired and enter the markup with the citation or note inside the <ref>...</ref>
tags. For example:
Markup | Result |
---|---|
This is page content.<ref>This is a reference</ref> {{reflist}} |
This is page content.[1]
|
The {{reflist}}
template will be explained in the next section.
The content inside the <ref>...</ref>
will show in the reference list. The ref tags can be added anywhere a citation or note is needed. There must be content inside the tags, else an error will show.
Where to place ref tags
Ref tags should follow any punctuation (usually a period), not precede it. There should be no space between the punctuation and the tag:
Markup | Result | Notes |
---|---|---|
...text.<ref>This is a reference</ref> {{reflist}} |
...text.[1]
|
Correct ✔ |
...text<ref>This is a reference</ref>. {{reflist}} |
...text[1].
|
Wrong ✘ - Tag before punctuation |
...text. <ref>This is a reference</ref> {{reflist}} |
...text. [1]
|
Wrong ✘ - Space before text |
For further guidance, see Bulbapedia:Manual of style/References.
Reference lists
Once any number of footnotes have been inserted into the content, the reference list must be generated. For the basic reference list, add {{reflist}}
wherever the list is desired. Once the page is published and viewed, the footnotes will be automatically generated and numbered and the reference list will be generated. The main reference list is placed in a separate section, usually titled "References".
Example:
Markup | Result |
---|---|
This is page content.<ref>This is a reference</ref> This is some more page content.<ref>This is another reference</ref> ==References== {{reflist}} |
This is page content.[1] This is some more page content.[2]
References
|
Notes
- When editing,
<references />
may be seen instead of{{reflist}}
. This will automatically display the references in multiple columns, but<references />
does not offer the other advanced features of{{reflist}}
. - If
{{reflist}}
or<references />
are not included in an article with ref tags, MediaWiki will automatically display the references at the bottom of the article. This will not include a section heading, or any of the other desired formatting, and should be avoided.
Using a source more than once
You can cite the same source more than once on a page by using named references. The syntax to define a named footnote is:
<ref name="name">content</ref>
To invoke the named footnote:
<ref name="name" />
Names for footnotes and groups must follow these rules:
- Names are case-sensitive.
- Names must not be purely numeric.
- Names must be unique. You may not use the same name to define different groups or footnotes.
- Names should be short, simple, and restricted to the standard English alphabet and numerals (avoid special characters and spaces).
Example:
Markup | Result |
---|---|
This is page content.<ref name="example">This is a reference</ref> This is some more page content.<ref name="example" /> {{reflist}} |
This is page content.[1] This is some more page content.[1] |
The actual name used can be almost anything, but it is recommended that it have a connection to the citation or note. This helps editors remember the name, by associating it with the information that is visible to the reader.
When using both names and groups, the syntax is:
<ref group="groupname" name="name">content</ref>
Care should be taken when deleting named references to avoid creating a cite error.
Groups
Sometimes it is useful to group the footnotes into separate lists, for example to separate explanatory notes from references, or to list references for tables, image captions, etc. The sequence of footnote labels is independent in each group.
The syntax to define a footnote with a group is:
<ref group="groupname">content</ref>
Example:
Markup | Result |
---|---|
This part of the text requires clarification,<ref group="Note">Listed separately from the citation</ref> whereas the entire text is cited.<ref>Citation</ref> And this needs even more clarification.<ref group="Note">Another note</ref> ==Notes== {{reflist|group=Note}} ==References== {{reflist}} |
This part of the text requires clarification,[Note 1] whereas the entire text is cited.[1] And this needs even more clarification.[Note 2]
Notes
References
|
Note that the footnote labels in the reference list show only the numbers and not the group name.
When using both names and groups, the syntax is:
<ref group="groupname" name="name">content</ref>
For the repeated note:
<ref group="groupname" name="name" />
Broken references
If the <ref>
or <references />
tags or {{reflist}}
template are used incorrectly, the Cite extension will add an error message to the page, and will add the "Pages with reference errors" category. This can be caused by:
-
<ref>
tags on the page without content in them. - Opening
<ref>
tags being malformed or having an invalid name. - A
<ref>
tag having too many names. - A
<ref>
tag having a name that contains only numbers. - A
<ref>
tag missing the closing</ref>
. - A named reference being invoked that is never defined on the page.
- A named reference being defined multiple times with different content.
- Adding references to a group, but not including a
{{reflist}}
for that group.
Example:
Markup | Result |
---|---|
This is an example of a references error message.<ref name="123">Intended text.</ref> ==References== {{reflist}} |
This is an example of a references error message.Cite error: Invalid <ref> tag; name cannot be a simple integer. Use a descriptive title
References
|
For a full list of possible errors, see wp:Help:Cite errors.
See also
Navigation | Navigation • Search • Tracking changes • Logging in • Watchlist |
---|---|
Editing | Editing pages • VisualEditor • Wikicode (Tables) • Images (Media Viewer) • Talk pages • Categories • Subpages • Cheatsheet |
Advanced | Starting a new page • Moving (renaming) a page • Merging pages • Splitting pages • Deleting pages • References • Special pages |
Templates | Using templates (Link templates • Color templates) • Creating templates (Magic words • TemplateStyles • TemplateData) • Lua (Crash course) |
Customization | Preferences • Skins • Custom CSS • User page • Signatures |
Archives | FAQ • Uploading images • Tagging images • Manual of style |
Introduction • FAQ • Editor's Hub |