- This extension is enabled by default on Fandom.
The cite feature allows you to add footnotes and references to articles, like this.[1]
How to use it[]
In the VisualEditor[]
On the toolbar, there is a button with an open book icon. Clicking on it opens a dropdown which offers adding a basic citation reference or reusing one that was previously inserted.
In addition, there is a need to insert the actual references list on the page (anyway below all the references, but typically it will be at the bottom, under a section titled "References" or something similar). Place the cursor on the desired location, click on the "Insert" dropdown, and choose "References list".
In source editor[]
To create a footnote or reference while editing in source mode, simply place your text inside <ref></ref> tags. In source mode, the first sentence on this page would look like this:
The cite feature allows you to add footnotes and references to articles, like this.<ref>Like this!</ref>
At the end of the page create a section titled "references", "footnotes", "citations", etc. and include the code <references />. This will create a numbered listing of your footnotes (see at the bottom).
The toolbar on the editor (both on VisualEditor source mode and the 2010 source editor) also contains a button to help manage references more easily.
Named references[]
A specific reference citation can have a "name" or "identifier", allowing referencing the same footnote more than once.
On VisualEditor, the citation dialog box has an option to add an existing identifier, so the same reference can be re-used. Although, the re-use option is available anyway and VisualEditor will automatically assign it an identifier if needed.
In source editing, to give a footnote a unique identifier, use <ref name="identifier">footnote text</ref>
.[2] You can then refer to the same footnote again by using a ref tag with the same name. Note: the name cannot be a number, or it will return an error.
Only the first occurrence of text in a named reference will be used, although that occurrence may be located anywhere in the article. For legibility, putting the full footnote first is recommended.
For subsequent identical references, use a self-closing empty ref tag that looks like this: <ref name="identifier" />
.[2]
When deleting content with footnotes, make sure you do not delete the named citation, which holds all the reference information. This will result in an error for all the other footnotes depending on it. Remember to copy the <ref name="identifier">footnote text</ref>
to one of the identical references.
Grouped references[]
References can be grouped into several lists.
On VisualEditor, the citation dialog box allows assigning each reference to a certain group. Then, insert a references list using the "Insert" dropdown as explained above, select it, and click "Edit" on the pop-up box. You will get an option to define that references list to show a certain group.
In source editing, use <ref group="identifier">grouped reference text</ref>
[identifier 1] in order to assign a reference to a certain group, and use <references group="identifier"/>
to insert the references list of that group.
All reference lists have to be located after all the related references, otherwise they will render errors.
- ↑ grouped reference text
Citation needed![]
Some communities use a template to flag information that need citations. Often that means adding {{fact}}
or {{cite}}
just after the text in question.
To create such a template, you can make a new page called Template:Fact, and put the following code on it:
<sup><span title="This claim needs references to reliable sources" style="white-space: nowrap;">[''citation needed'']</span></sup>
This will result in [citation needed].
More fun with citations[]
Eventually, you may want to create templates specifically for use within references to keep order - for example, a template for web addresses, another for book references.
Finally, you may wish to customize the references list design itself, such as by giving it two columns or reducing the text size slightly. This can be done effectively with CSS, using the .references
class as a selector.
Citation templates[]
If your community deals with an academic subject, you may wish to have default citation templates. Non-Lua versions of these templates can be found on Template:Cite book and Template:Cite journal.
References[]
See also[]
- Footnote guidelines on Wikipedia
- mw:Help:Cite
- mw:Extension:Cite for extension info
- Creating links
- Templates
Further help and feedback[]
- Browse and search other help pages at Help:Contents
- Check Fandom Community Central for sources of further help and support
- Check Contacting Fandom for how to report any errors or unclear steps in this article