don't use definition list markup to bold a line |
Kwamikagami (talk | contribs) |
||
Line 172: | Line 172: | ||
The quick brown fox jumps over the lazy dog.{{#tag:ref|This is the lazy-dog footnote.<ref name="ex">This is the reference to the lazy-dog footnote.</ref>|group="nb"}} |
The quick brown fox jumps over the lazy dog.{{#tag:ref|This is the lazy-dog footnote.<ref name="ex">This is the reference to the lazy-dog footnote.</ref>|group="nb"}} |
||
'''Notes''' |
'''Notes''' |
||
{{reflist|group="nb"}} |
{{reflist|group="nb"}} |
||
'''References''' |
'''References''' |
||
{{reflist|name="ex"}} |
{{reflist|name="ex"}} |
Revision as of 03:52, 13 September 2011
- See also Wikipedia:Manual of Style/Footnotes for further details.
![](https://upload.wikimedia.org/wikipedia/commons/thumb/5/56/WP-Footnotes_illustration.jpg/400px-WP-Footnotes_illustration.jpg)
This page explains how to create footnotes when editing an article. Footnotes appear automatically in a numbered list at the end of an article when you use two small pieces of code in the text: <ref>...</ref>
within the text, and <references />
at the end of the article where the footnote list is to appear. (These pieces of code are called tags.)
The most common use of footnotes in Wikipedia articles is to provide references (inline citations), although footnotes can also be used for other purposes.
This page concerns technical methods for creating footnotes. For policy about the need for citations and choice of sources to cite, see Wikipedia:Verifiability. For how to format the citations, see Wikipedia:Citing sources. For another method of presenting inline citations, see Wikipedia:Parenthetical references.
Overview
Footnoting is an automated system. The footnoting system involves two elements:
- Footnote markers. These are links, usually in the form [1], [2], etc. Clicking on a footnote marker will take you to the correspondingly numbered footnote.
- The footnotes themselves. These appear in a list (usually placed near the end of the article), and include links back to the corresponding footnote markers.
The text of a footnote is placed in the page's editable text, between <ref>...</ref>
tags, at the point where the footnote marker is to appear. The list of footnotes is generated using the <references />
tag (or a corresponding template), placed in the editable text at the point where the footnotes are to appear. If the page contains footnote markers but no footnote list, a red warning message will appear.
Creating a footnote
At the point in the page text where the footnote marker is to appear, enter the text of the footnote and put the two pieces of coding before and after the footnote-text, like this:
<ref>LibreOffice For Starters, First Edition, Flexible Minds, Manchester, 2002, p. 18</ref>
The symbols < > and / can be found on your keyboard.
This will create a footnote marker (automatically numbered). The footnote text itself will appear in the footnote list, generated as described in the next section. If there is no footnote list code, a red warning message will appear, reminding you to write the code that generates the list.
You can include formatting and links in a footnote in the usual way, although note that certain features, such as the pipe trick and template substitution, will not work in footnotes. For the formatting of references, a number of templates, such as a generic {{citation}}, or more specific {{cite book}}, {{cite web}}, etc., are available (see Citation templates), although many editors prefer not to use them. See Citing sources for details on how references can be structured.
Creating the footnote list
At the point where you want the text of the footnotes to appear (usually at the end of the article in a section titled "Notes" or "References"), write the following piece of code:
<references />
A commonly used alternative, which also introduces some formatting, is to use the {{Reflist}} template:
{{reflist}}
If a footnote list is generated but there are no footnotes on the page, the list will simply appear empty (no warning or error message is displayed). Notice that the footnote list must come after all the footnotes.
Multiple references to the same footnote
It is possible to refer to the same footnote more than once, i.e. to generate several footnote markers, all with the same number, which link to the same footnote. To achieve this, named footnotes (named references) are used.
A footnote is named using the name
parameter of the <ref>
tag. Choose a name (such as "Perry"), and then at one of the footnote marker points (it makes sense to choose the first), enter the footnote like this:
<ref name="Perry">Perry's Handbook, Sixth Edition, McGraw-Hill Co., 1984.</ref>
Then you can create another identical marker linking to the same footnote from any other point in the text, by entering the following (note the final slash):
<ref name="Perry" />
The footnote name is internal and will not be displayed anywhere when the page is viewed. Footnote names are case sensitive and may not be a numeric integer. The quotes are optional unless the name or group includes a space, or certain punctuation marks and other characters. It is recommended that names be kept simple and restricted to the standard English alphabet and numerals.
What it looks like
When a page with footnotes is displayed in a browser, the <ref>
tags in the main text are converted to auto-numbered superscripts, like this:
The only reference to LibreOffice for Starters.[1] The first reference to Perry's Handbook.[2] The second reference to Perry's Handbook and to another, related book.[2][3] A statement that requires a reference.[citation needed] The only reference to Linux in a Nutshell.[4] And third reference to Perry's Handbook.[2] |
Clicking on a numbered superscript takes you straight to the text of the corresponding footnote. (The "[citation needed]" item is not a footnote marker; it is produced by the {{fact}} template, used to indicate a point where a reference ought to be provided.)
The <references />
tag or {{reflist}} template is expanded to show the text of the footnotes against their corresponding numbers, like this:
For single-reference footnotes, clicking on the caret (^) takes you back to the footnote marker in the main text. For multiple-reference footnotes, the links back to the main text are distinguished by letter superscripts (a, b, c etc.). Clicking on a letter superscript takes you to the corresponding marker in the main text.
Grouping footnotes
Sometimes it is useful to group the footnotes on a page into separate lists, for example to separate explanatory notes from references, or to list references of a table or side box separately from the references of the text. This can be accomplished with the "group" parameter:
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>
==Notes==
<references group="note" />
==References==
{{Reflist|close=1}}
This part of the text requires clarification,[note 1] whereas the entire text is cited.[1]
Notes
- ^ Listed separately from the citation
References
- ^ Citation.
Note that, at present, because of limitations in the Cite software, such footnotes cannot themselves contain reference links. However, the magic word {{#tag:ref}}
may be used to nest references. The markup is:
{{#tag:ref|refcontent|name=name|group=groupname}}
where refcontent may include <ref>...</ref>
tags. The name and groupname are optional, but must come after refcontent. A named #tag:ref construct may be reused by invoking:
<ref name=name group=groupname />
Further information can be found at WP:REFNEST
Footnotes may also be listed at the ends of each section of text by closing the {{Reflist}} template with the "close" parameter, as shown in the box just above.
List-defined references
As of September 2009, the cite software allows named references to be defined within the reference list rather than in the article text. This can make editing articles much easier, particularly on heavily cited sections. For example:
The quick brown fox jumps over the lazy dog.<ref name="LazyDog" />
<references>
<ref name="LazyDog">This is the lazy dog reference.</ref>
</references>
The quick brown fox jumps over the lazy dog.[1]
- ^ This is the lazy dog reference.
This can also be done using the {{Reflist}} template with a |refs=
parameter. If desired, the |group=
parameter can be used to group references for the template:
The quick brown fox jumps over the lazy dog.<ref name="LazyDog" />
Amazingly few discotheques provide jukeboxes.<ref name="Jukeboxes" />
How razorback-jumping frogs<ref name="Batteries" group="note" /> can level six piqued gymnasts.<ref name="JumpingFrogs" />
==Notes==
{{reflist|group="note"|
refs=
<ref name="Batteries" group="note">Batteries not included.</ref>
}}
==References==
{{reflist|
refs=
<ref name="LazyDog">This is the lazy dog reference.</ref>
<ref name="Jukeboxes">This is the jukeboxes reference.</ref>
<ref name="JumpingFrogs">This is the jumping frogs reference.</ref>
}}
The quick brown fox jumps over the lazy dog.[1]
Amazingly few discotheques provide jukeboxes.[2]
How razorback-jumping frogs[note 1] can level six piqued gymnasts.[3]
Notes
- ^ Batteries not included.
References
Embedding references within footnotes
A <ref>
code cannot be embedded within another <ref>
code. Harvard citation format is a common means to circumvent this limit. However, a {{#tag:ref}}
template has been created that supports references within footnotes. It is available in the 'Wiki markup' edit window. The syntax is {{#tag:ref|...|group="x"|name="x"}}
, where ...
is the text to appear and both the 'group' and 'name' parameters are optional.
The quick brown fox jumps over the lazy dog.{{#tag:ref|This is the lazy-dog footnote.<ref name="ex">This is the reference to the lazy-dog footnote.</ref>|group="nb"}}
==Notes==
{{reflist|group="nb"}}
==References==
{{reflist|name="ex"}}
The quick brown fox jumps over the lazy dog.[nb 1]
Notes
References
- ^ This is the reference to the lazy-dog footnote.
References missing
When you want to note that a reference is needed, use the template {{fact}} within the text, in the same place where the <ref>
should be.
If many footnotes and/or references are needed consider tagging the article with a specific template, instead of tagging every reference needed.
See also
- Wikipedia:Referencing for beginners – a step by step guide
- Wikipedia:Citing sources
- Wikipedia:Embedded citations
- Template:Reflist-talk – for use on talk pages
- Template:Rp – Multiple citations page numbering template
- m:help:footnotes – General MediaWiki footnotes documentation
- Wikipedia:Footnote3 – An older method, obsolete except for Harvard references
- mw:Extension:Cite/Cite.php – technical details about cite.php technology