Difference between revisions of "Template:Footnotes"

From blackwiki
Jump to navigation Jump to search
test>Shearonink
(→‎Explanatory notes: fixed mistake in coding)
m (9 revisions imported)
 
(636 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
{{Wikipedia how to|HELP:FOOT}}
+
<noinclude>{{pp-semi-indef}}</noinclude>{{short description|Wikipedia help article}}
This page explains how to create '''footnotes''' on Wikipedia pages. Footnotes are used most commonly to provide '''references''' in articles, although they have other uses as well. They are generated using the following tags in the editable text of a page: '''{{tag|ref}}''' within the text, and {{tag|references|s}} or <code><nowiki>{{reflist}}</nowiki></code> at the end where the footnote list is to appear.
+
{{For|the official guideline on citing sources|Wikipedia:Citing sources}}
 +
{{For|help with citation templates|Help:Citation Style 1}}
 +
{{Redirect|WP:FN|the fringe theories noticeboard|Wikipedia:Fringe theories/Noticeboard}}
 +
{{Redirect|WP:NOTES|hatnotes|Wikipedia:Hatnotes|Musical notes|Wikipedia:Manual of Style/Music#Images and notation}}
 +
{{Wikipedia how to|H:FOOT|WP:FOOTNOTES|WP:FN}}
  
The most common use of footnotes in Wikipedia articles is to provide [[Wikipedia:Inline citations|inline citations]] to reliable sources, although footnotes can also be used for other purposes.  The use of <nowiki><ref></nowiki> tags is not required by any policy or guideline, and other systems of inline citation, including [[Wikipedia:Parenthetical referencing|parenthetical referencing]], may be used [[WP:CITEVAR|at the editors' discretion]].  However, <nowiki><ref></nowiki> tags are by far the most popular system for inline citations.
+
This page explains how to create the '''Footnotes''' section for Wikipedia articles. In this context, the word "Footnotes" refers to the Wikipedia-specific manner of documenting an article's sources and providing tangential information, and should not be confused with the general concept of [[Note (typography)|footnotes]]. This how-to does not cover the formatting of citations within the Footnotes section, which is reviewed in [[Wikipedia:Citing sources|Citing sources]].
  
This page concerns technical methods for creating footnotes. For advice on how to organize and format references, see [[Wikipedia:Citing sources|Citing sources]] and [[Wikipedia:Citation_templates#Examples|Citation template examples]].
+
Footnotes are used most commonly to provide:
 +
* [[Wikipedia:Citing sources|references (bibliographic citations) to reliable sources]],
 +
* explanatory information or
 +
* source information for tables and other elements.
 +
 
 +
The use of Footnotes is only one of several options for providing source information in the article. Other systems of inline citation, including {{sfnote}} and {{paren}}, may be used at the editor's discretion in accordance with the guideline on [[WP:CITEVAR|Variation in citation methods]].
 +
 
 +
Only certain types of material on the English Wikipedia are required to have an inline citation. There is [[Wikipedia:Inline citation#Citation density|no requirement to provide a citation for every sentence]], because multiple sentences may be supported by the same footnote. For advice on which material should be cited, see the guidelines on [[WP:MINREF|When you must use inline citations]], the [[Wikipedia:Good article criteria|Good article criteria]] and [[Wikipedia:when to cite|When to cite]]. For advice on how to organize and format bibliographic citations, see the guideline on [[Wikipedia:Citing sources|Citing sources]] and examples of [[Wikipedia:Citation templates#Examples|Citation templates]].
 +
 
 +
Footnotes are created using the {{cite.php}} software extension. This extension adds the HTML-like elements {{tag|ref}}, {{tag|references|s}} and {{tag|references}}. The elements are also used in a number of templates; for example, it is becoming more common to use {{tl|reflist}} rather than {{tag|references|s}} as it can style the reference list.
  
 
==Overview==
 
==Overview==
[[File:WP-Footnotes illustration.jpg|thumb|right|400px|How a footnote is created in the editable text of a page. (Click to see more detail.)]]
+
{{VE documentation|style=width: 25%; font-size: 87%; float:right}}<!--This is because the visual editor is even more limited than the standard Wikitext editor-->
The footnoting system involves two elements:
+
The Footnotes system shows two elements on the page:
* '''Footnote markers.''' These are links, usually in the form {{dummy ref|1}}, {{dummy ref|2}}, etc. Clicking on a footnote marker will take you to the correspondingly numbered footnote.
+
* A '''Footnote marker''' is displayed in the article's content as a bracketed, superscripted number, letter, or word. Examples shown respectively are: {{dummy ref}}{{dummy ref|a}}{{dummy ref|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.  If you are using the desktop site and have Javascript enabled, then hovering your cursor over a footnote marker (or touching it on touch devices) will show a pop-up box containing the 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.
+
* A '''Footnote''' displays the full citation for the source. Together the footnotes are displayed in an ordered list wherever the reference list markup {{tl|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 {{dummy ref}}, the second would be {{dummy ref|2}} and so on. Custom labels are also incremented: {{dummy ref|a}}{{dummy ref|b}}{{dummy ref|c}}, {{dummy ref|Note 1}} {{dummy ref|Note 2}} {{dummy ref|Note 3}}.
 +
:For a single use footnote, the label is followed by a caret (^) that is a backlink to the matching footnote marker. For example:
 +
{{dummy footnote|margin=5em}}
 +
:If a named footnote is used in the text multiple times, then the footnote has multiple backlinks shown as letters:
 +
{{dummy footnote|2|a b c|margin=5em}}
 +
:Clicking on the backlink or pressing {{keypress|Alt|←}} returns to the footnote marker.
 +
 
 +
===Footnotes in action===
 +
The superscript numeral "1" in square brackets at the end of this sentence is an example of a footnote marker.<ref>This is a footnote that contains a citation or note.</ref>
  
Footnote markers are generated using <nowiki><ref></nowiki> tags. The list of footnotes is generated using the <nowiki><references /></nowiki> tag, or the corresponding {{tlx|reflist}} template, placed in the editable text at the point where the footnotes are to appear. The text of a footnote is placed between opening <nowiki><ref></nowiki> and closing <nowiki></ref></nowiki> tags, either at the point where the footnote marker is to appear, or within the <nowiki><references /></nowiki> element. If the page contains footnote markers but no footnote list, a red [[Help:cite error|cite error]] message will appear.
+
{{reflist}}
 +
{{anchor|Footnote markers: the basics}}
  
==Creating a footnote marker==
+
==Footnotes: the basics==
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:
+
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 {{tag|ref}} tags. For example:
  
:<code><nowiki><ref>LibreOffice For Starters, First Edition, Flexible Minds, Manchester, 2002, p. 18</ref></nowiki></code>
+
{{markup
 +
|<nowiki>This is page content.<ref>''LibreOffice For Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref>
 +
{{reflist}}</nowiki>
 +
|This is page content.<ref>''LibreOffice For Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref>
 +
{{reflist}}
 +
}}
 +
 
 +
:The {{tl|reflist}} template will be explained in the next section.
 +
 
 +
The content inside the {{tag|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.
 +
 
 +
{{anchor|Where_to_place_ref_tags}} Ref tags should follow any punctuation (usually a period), not precede it; see [[WP:REFPUNC]]. There should be no space between the punctuation and the tag:
 +
 
 +
{{markup
 +
|<nowiki>...text.<ref>Content of the reference</ref>
 +
{{reflist}}</nowiki>
 +
|...text.<ref>Content of the reference</ref> &nbsp; &nbsp; {{xt|Right}}
 +
{{reflist}}
 +
|<nowiki>...text<ref>Content of the reference</ref>.
 +
{{reflist}}</nowiki>
 +
|...text<ref>Content of the reference</ref>. &nbsp; &nbsp; {{!xt|Wrong (tag before punctuation)}}
 +
{{reflist}}
 +
|<nowiki>...text. <ref>Content of the reference</ref>
 +
{{reflist}}</nowiki>
 +
|...text. <ref>Content of the reference</ref> &nbsp; &nbsp; {{!xt|Wrong (space before tag)}}
 +
{{reflist}}
 +
}}
 +
 
 +
The content of the ref tags can be formatted using most wikimarkup or HTML markup, although techniques such as the [[Help:Pipe trick|pipe trick]] and [[Help:Substitution|template substitution]] will not work in footnotes. For example:
 +
 
 +
{{markup
 +
|<nowiki>This is page content.<ref>''LibreOffice For Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref>
 +
{{reflist}}</nowiki>
 +
|This is page content.<ref>''LibreOffice For Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref>
 +
{{reflist}}
 +
}}
 +
 
 +
The ref tag content may also contain an internal or external link:
 +
 
 +
{{markup
 +
|<nowiki>This is page content.<ref>''[http://www.example.org LibreOffice For Starters]'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref>
 +
{{reflist}}</nowiki>
 +
|This is page content.<ref>''[http://www.example.org LibreOffice For Starters]'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref>
 +
{{reflist}}
 +
}}
 +
 
 +
{{MediaWiki URL rules}}
 +
 
 +
==Reference lists: the basics==
 +
Once any number of footnotes have been inserted into the content, the reference list must be generated. For the basic reference list, add {{tl|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", "Notes" or the like.
 +
 
 +
{{markup
 +
|<nowiki>This is page content.<ref>''LibreOffice For Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref>
 +
 
 +
==References==
 +
{{reflist}}</nowiki>
 +
|This is page content.<ref>''LibreOffice For Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref>
  
This will create a footnote marker (automatically numbered). The footnote text itself will appear in the footnote list, generated as described below. If there is no footnote list code, a red warning message will appear, reminding you to write the code that generates the list.
+
{{fake heading|sub=2|References}}
 +
{{reflist}}
 +
}}
  
You can include formatting and links in a footnote in the usual way, although certain features, such as the [[Help:Pipe trick|pipe trick]] and [[Help:Substitution|template substitution]], will not work in footnotes. For the formatting of references, [[Wikipedia:citation templates|citation templates]], such as a generic {{tl|citation}}, or more specific {{tl|cite book}}, {{tl|cite web}}, etc., are available, although many editors prefer not to use them. See [[WP:Citing sources|Citing sources]] for details on how references can be structured.
+
'''Notes'''
 +
{{shortcut|HELP:MULTIREF}}
 +
* In some cases, a page has more than one reference list. Until 2014, multiple uses of {{tl|reflist}} on the same page required use of a {{para|close}} parameter; that bug has been fixed and the{{para|close}} parameter may safely be removed.
 +
*When editing, {{tag|references|s}} may be seen instead of {{tl|reflist}}. This is valid, but {{tag|references|s}} does not offer the advanced features of {{tl|reflist}}.
  
To aid readability in the edit window, a single newline can be added after the closing <code><nowiki></ref></nowiki></code> tag before continuing with the text of the paragraph. This has the same effect as putting a space after the closing tag.
+
{{anchor|Naming a ref tag so it can be used more than once|Footnote markers: using a source more than once}}
  
===Multiple references to the same footnote===
+
==Footnotes: using a source more than once==
{{Shortcut|WP:NAMEDREFS|WP:NAMEDREFERENCES}}
+
{{Shortcut|WP:REFNAME|WP:NAMEDREFS}}
It is possible to refer to the same footnote more than once, in other words 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.
+
{{Anchor|Reference name (naming a ref tag so it can be used more than once)}}
 +
{{Anchor|WP:NAMEDREF}} <!-- from WP:NAMEDREFS redirect -->
 +
{{See also|Wikipedia:Citing sources#Citing multiple pages of the same source}}
 +
You can cite the same source more than once on a page by using named footnotes. The syntax to define a named footnote is:
 +
:{{tag|ref|params=name="<var>name</var>"|content=<var>content</var>}}
  
A footnote is named using the <code>name</code> parameter of the <code><nowiki><ref></nowiki></code> 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:
+
To invoke the named footnote:
 +
:{{tag|ref|s|params=name="<var>name</var>"}}
  
:<code><nowiki><ref name="Perry">Perry's Handbook, Sixth Edition, McGraw-Hill Co., 1984.</ref></nowiki></code>
+
{{refname rules}}
  
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):
+
{{markup
 +
|<nowiki>This is page content.<ref name="manchester2002">''LibreOffice for Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref> This is more content.<ref name="manchester2002" />
 +
{{reflist}}</nowiki>
 +
|This is page content.<ref name="manchester2002">''LibreOffice for Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref> This is more content.<ref name="manchester2002" />
 +
{{reflist}}
 +
}}
  
:<code><nowiki><ref name="Perry" /></nowiki></code>
+
The actual name used can be almost anything, but it is recommended that it have a connection to the citation or note. A common practice is to use the author-year or publisher-year for the reference name. This helps editors remember the name, by associating it with the information that is visible to the reader.
  
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 an integer numeral. 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.
+
Note that the footnote labels are incremented in the order they are used, and that they use the same label when reused, thus the labels can seem out of order:
 +
{{markup
 +
|<nowiki>This is starter content.<ref name="manchester2002">''LibreOffice for Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref> This is expert content.<ref name="lexington2004">''OpenOffice for Experts'', Lexington, 2004, p. 18</ref> And more starter content.<ref name="manchester2002" /> And more expert content.<ref name="lexington2004" />
 +
{{reflist}}</nowiki>
 +
|This is starter content.<ref name="manchester2002">''LibreOffice for Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref> This is expert content.<ref name="lexington2004">''OpenOffice for Experts'', Lexington, 2004, p. 18</ref> And more starter content.<ref name="manchester2002" /> And more expert content.<ref name="lexington2004" />
 +
{{reflist}}
 +
}}
  
Be careful when deleting text containing named footnotes – if you delete the instance which contains the footnote text, without replacing it elsewhere, you will break other instances of the same named footnote on the page. [[Help:Cite errors|Error messages]] will be generated if the named footnotes used have not been properly defined.
+
When using both names and [[#Footnotes:_groups|groups]], the syntax is:
 +
:{{tag|ref|params=group="<var>groupname</var>" name="<var>name</var>"|content=Content}}
 +
Care should be taken when deleting references to avoid creating a cite error. See [[Wikipedia:Avoiding common mistakes#Deleting...|Avoiding common mistakes]]
  
==Creating the footnote list==
+
==Reference lists: columns==
At the point where you want the text of the footnotes to appear (usually at the end of the article in a [[Help:section|section]] titled "Notes" or "References" – see the [[WP:Footers|Footers]] in the layout guideline), write the following code:
+
{{shortcut|H:REFCOLS}}
 +
{{hatnote|Columns are not supported by Internet Explorer 9 and below; see {{tl|reflist}} for technical details}}
 +
When using {{tl|reflist}}, the list can be split into columns.
 +
:{{tlx|reflist|<var>xx</var>em}} where <var>xx</var> is the column width in [[em (typography)|em]].
 +
By setting the width in em, the number of columns will automatically be adjusted to the width of the display. It should be used only when necessary, as the template has built-in auto-formatting capabilities providing a useful display in most scenarios by itself.
  
:<code><nowiki><references /></nowiki></code>
+
The [[Template:Reflist#Columns|set columns feature]] is now [[deprecated]] in favor of the option described above, which is better suited to flexible formatting for a variety of display screen sizes, ranging from mobile phones and tablets to wide-screen "cinema" displays. Forcing a fixed number of columns has been disabled in mobile view.
  
A commonly used alternative, which also introduces some formatting, is the {{tl|Reflist}} template:
+
The number of columns to use is up to the editor, but some major practices include:
 +
* {{tlx|Reflist}} - 1 column (default): Where there are only a few {{fnote}}; see {{oldid|Silver State Arena|530211388#References|Silver State Arena (23:05, 28 December 2012)}}
 +
* {{tlx|Reflist|30em}}: Where there are many footnotes plus a page-width Bibliography subsection: see {{oldid|Ebola virus disease|561190497#References|Ebola virus disease (06:28, 23 June 2013)}}
 +
* {{tlx|Reflist|20em}}: Where {{sfnote}} are used; see {{oldid|NBR 224 and 420 Classes|442508215#Notes|NBR 224 and 420 Classes (13:32, 1 August 2011)}}.
  
:<code><nowiki>{{reflist}}</nowiki></code>
+
For example:
 +
Using {{tlx|Reflist|30em}} will create columns with a minimum width of 30 em,
 +
{{markup|title=30em wide columns
 +
|<nowiki>Lorem ipsum.<ref>Source name, access date, etc.</ref>
  
This template has parameters available for splitting the list into columns, and for controlling their width. For example, {{tlx|reflist|2}} creates a list split into two columns. For more options, see the [[Template:Reflist|reflist template documentation]].
+
Lorem ipsum dolor sit amet.<ref>Source name, access date, etc.</ref>
  
The footnote list must come ''after'' all the footnote markers.
+
==References==
 +
{{Reflist|30em}}</nowiki>
 +
|Lorem ipsum.<ref>Source name, access date, etc.</ref>
 +
Lorem ipsum dolor sit amet.<ref>Source name, access date, etc.</ref>
  
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).
+
{{fake heading|sub=3|References}}
 +
{{Reflist|30em}}
 +
}}
  
===List-defined references===
+
==List-defined references==
 
{{shortcut|WP:LDR}}
 
{{shortcut|WP:LDR}}
In order to make the article text easier to read in the edit window, particularly in sections with many citations, editors may decide to write all footnotes in the shorter "named" form. This can be done using the '''list-defined references''' function, where the content of the references is defined within the reference list, rather than in the article text. The syntax is as follows:
+
{{main|Help:List-defined references}}
 +
Some or all of the footnotes can also be defined within the reference section/list, and invoked in the page content. This keeps those citations in one central location for easier maintenance and avoids cluttering the text. This is purely a source code change{{snd}}the actual display of the citation in the text to a reader is unaffected. For a more detailed evaluation of this method, see [[WP:LDRHOW]]. The syntax is:
  
<pre>The quick brown fox jumps over the lazy dog.<ref name="LazyDog" />
+
<syntaxhighlight lang="xml">
 +
{{reflist|refs=
 +
<ref name="name1">Content</ref>
 +
<ref name="name2">Content</ref>
 +
<ref name="name...n">Content</ref>
 +
}}
 +
</syntaxhighlight>
  
<references>
+
or, alternatively,
<ref name="LazyDog">This is the lazy dog reference.</ref>
 
</references></pre>
 
 
 
The quick brown fox jumps over the lazy dog.<ref name="LazyDog" />
 
  
 +
<syntaxhighlight lang="xml">
 
<references>
 
<references>
<ref name="LazyDog">This is the lazy dog reference.</ref>
+
<ref name="name1">Content</ref>
 +
<ref name="name2">Content</ref>
 +
<ref name="name...n">Content</ref>
 
</references>
 
</references>
 +
</syntaxhighlight>
  
This can also be done using the {{tl|Reflist}} template with a {{para|refs}} parameter:
+
The footnote markers are included as usual for a named footnote. For example:
  
<pre>The quick brown fox jumps over the lazy dog.<ref name="LazyDog" />
+
{{markup
Amazingly few discotheques provide jukeboxes.<ref name="Jukeboxes" />
+
|<nowiki>The quick brown fox jumps over the lazy dog.<ref name="LazyDog"/>
How razorback-jumping frogs can level six piqued gymnasts.<ref name="JumpingFrogs" />
+
Amazingly few discotheques provide jukeboxes.<ref name="Jukeboxes"/>
 +
How razorback-jumping frogs can level six piqued gymnasts.<ref name="JumpingFrogs"/>
  
 
==References==
 
==References==
 
{{reflist|
 
{{reflist|
 
refs=
 
refs=
 +
<ref name="Jukeboxes">This is the jukeboxes reference.</ref>
 
<ref name="LazyDog">This is the lazy dog reference.</ref>
 
<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>
 
<ref name="JumpingFrogs">This is the jumping frogs reference.</ref>
}}</pre>
+
}}</nowiki>
 
+
|The quick brown fox jumps over the lazy dog.<ref name="LazyDog"/>
The quick brown fox jumps over the lazy dog.<ref name="LazyDog" />
+
Amazingly few discotheques provide jukeboxes.<ref name="Jukeboxes"/>
Amazingly few discotheques provide jukeboxes.<ref name="Jukeboxes" />
+
How razorback-jumping frogs can level six piqued gymnasts.<ref name="JumpingFrogs"/>
How razorback-jumping frogs can level six piqued gymnasts.<ref name="JumpingFrogs" />
 
  
'''References'''
+
{{fake heading|sub=3|References}}
 
{{reflist|
 
{{reflist|
 
refs=
 
refs=
Line 96: Line 221:
 
<ref name="Jukeboxes">This is the jukeboxes reference.</ref>
 
<ref name="Jukeboxes">This is the jukeboxes reference.</ref>
 
<ref name="JumpingFrogs">This is the jumping frogs reference.</ref>
 
<ref name="JumpingFrogs">This is the jumping frogs reference.</ref>
}}
+
}}}}
  
References which are list-defined but unused will show a [[Help:cite error|cite error]] message. The references will appear numbered in the order that they are referred to in the text, regardless of how they are ordered within the reflist/references template.
+
The references will be numbered, and appear in the output, ''in the order that they are first referred to in the content,'' regardless of their order within the list. All references in reference list must be referenced in the content, otherwise an error message will be shown.
  
The [[User:PleaseStand/References segregator|References segregator]] tool can automatically convert references to the list-defined format.
+
Note that when you use the visual editor, you will not be able to add, remove, or change list-defined references.
  
==What it looks like==
+
{{anchor|Embedding references within footnotes}}
When a page with footnotes is displayed in a browser, the <code><nowiki><ref></nowiki></code> tags in the main text are converted to auto-numbered superscripts, like this:
 
  
{|class=wikitable
+
==Footnotes: embedding references==
|
+
{{shortcut|WP:REFNEST}}
The only reference to LibreOffice for Starters.<ref>LibreOffice for Starters, First Edition, Flexible Minds, Manchester, 2002.</ref> The first reference to Perry's Handbook.<ref name="Perry">Perry's Handbook, Sixth Edition, McGraw-Hill Co., 1984.</ref> The second reference to Perry's Handbook and to another, related book.<ref name="Perry" /><ref>Nuclear Chemical Engineering (2nd Edition), McGraw-Hill Co., 1981.</ref> A statement that requires a reference.{{fact}} The only reference to Linux in a Nutshell.<ref>Linux in a Nutshell, O'Reily Co., 2003.</ref> And third reference to Perry's Handbook.<ref name="Perry" />
 
|}
 
  
Clicking on a numbered superscript takes you straight to the text of the corresponding footnote. (The "<sup>[''citation needed'']</sup>" item is not a footnote marker; it is produced by the {{tl|fact}} template, used to indicate a point where a reference ought to be provided.)
+
{{See also|WP:Nesting footnotes}}
  
The <code><nowiki><references /></nowiki><code> tag or {{tl|reflist}} template is expanded to show the text of the footnotes against their corresponding numbers, like this:
+
[[Help:Explanatory notes|Explanatory notes]] may need to be referenced. Because of limitations in the {{cite.php}} software, reference tags cannot be nested; that is, a set of {{tag|ref}} tags cannot be placed inside another pair of {{tag|ref}} tags. Attempting to do so will result in a cite error.
  
{|class=wikitable
+
The template {{tl|refn}} may be used to nest references. The markup is:
|
 
<references />
 
|}
 
  
For single-reference footnotes, clicking on the caret (<font color=blue>'''^'''</font>) 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 (<font color=blue>'''''a'''''</font>, <font color=blue>'''''b'''''</font>, <font color=blue>'''''c'''''</font> etc.). Clicking on a letter superscript takes you to the corresponding marker in the main text.
+
:{{tlx|refn|2=group=group|3=name=name|4=content}} ''name'' and ''group'' being optional parameters. The content may include {{tag|ref|o}} tags.
  
===Previewing edits===
+
The other templates listed below in [[#Footnotes: predefined groups|Predefined groups]] are variants of {{tl|refn}} that include a styled group and have a matching styled reference list template.
When you [[WP:SECT#Section editing|edit a single section]] of a page, the footnotes list will not be visible when you [[Help:Show preview|preview your edits]]. Thus you ordinarily cannot see how your footnotes will later appear when you save your edits.
 
  
If this is a problem, you can insert a {{tlx|reflist}} into the edited section temporarily (remembering to delete it again before you save your edits). However you will still not be able to see named references which were defined in other sections: to do this, you would either have to paste in text from the other sections as a temporary measure, or open the whole page in the edit window instead of just one section.
+
Example:
 
Another workaround for this issue is to use the [[User:Cacycle/wikEd|wikEd]] gadget.
 
 
 
==Grouping footnotes==
 
{{shortcut|WP:REFGROUP|WP:CITELABEL}}
 
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, infoboxes and navboxes. This can be accomplished with the <var>group</var> parameter. The sequence of footnote labels is independent in each group.
 
 
 
===Editor-defined groups===
 
Footnotes that do not use the <var>group</var> parameter have plain automatic numbers for their labels. When the <var>group</var> parameter is used, in-text footnote labels are formed from the group name, a space and the automatic number. However the labels in the footnote list entries just use the numbers without the prefix.
 
  
{{pre2|<nowiki>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>
+
{{markup
 +
|<nowiki>The quick brown fox jumps over the lazy dog.{{refn|group=nb|A footnote.<ref>A reference for the footnote.</ref>}}
  
 
==Notes==
 
==Notes==
{{reflist|group=note}}
+
{{reflist|group=nb}}
  
 
==References==
 
==References==
{{reflist}}</nowiki>}}
+
{{reflist}}
 +
</nowiki>
 +
|The quick brown fox jumps over the lazy dog.{{refn|group=nb|A footnote.<ref>A reference for the footnote.</ref>}}
  
Which will show as:
+
{{fake heading|sub=3|Notes}}
 +
{{reflist|group=nb}}
  
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>
+
{{fake heading|sub=3|References}}
 +
{{reflist}}
 +
}}
  
'''Notes'''
+
The use of the magic word <code>#tag:ref</code> is valid, but the sequence of parameters is invariant and nonintuitive. {{tl|refn}} and its variants use this markup internally.
{{reflist|group=note}}
 
  
'''References'''
+
:<code>&#123;&#123;#tag:ref|<var>refcontent</var>|group=<var>groupname</var>|name=<var>name</var>}}</code>
{{reflist|close=1}}
+
{{anchor|Grouping footnotes}}
  
===Predefined groups===
+
==Footnotes: groups==
{{for|technical details|Help:Cite link labels}}
+
{{shortcut|WP:REFGROUP|WP:CITELABEL}}
There are several predefined group names that apply a style to the footnote labels and to the reference list:
 
  
{| class=wikitable"
+
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, infoboxes and navboxes. The sequence of footnote labels is independent in each group.
|+ Label styles
 
! Group name !! Style !! Sample
 
|-
 
| || Decimal numbers (default) || 1 2 3 4 5 6 7 8 9 10
 
|-
 
| decimal || Decimal numbers || 1 2 3 4 5 6 7 8 9 10
 
|-
 
| lower-alpha || Alpha, lower case || a b c d e f g h i j
 
|-
 
| upper-alpha || Alpha, upper case || A B C D E F G H I J
 
|-
 
| lower-greek || Greek, lower case || α β γ δ ε ζ η θ ι κ
 
|-
 
| lower-roman || Roman, lower case || i ii iii iv v vi vii viii ix x
 
|-
 
| upper-roman || Roman, upper case || I II III IV V VI VII VIII IX X
 
|}
 
  
The in-text footnote is defined using one of the group names:
+
The syntax to define a footnote with a group is:
 +
:{{tag|ref|params=group=<var>groupname</var>|content=Content}}
  
{{pre2|<nowiki><ref group=lower-alpha>Footnote 1</ref></nowiki>}}
+
The footnote marker group name ''must'' be enclosed in quotes if the group name includes a space, else a cite error will occur, otherwise quotes are optional.
  
The reference list is invoked using {{tl|reflist}} with the group name. The group name ''must not'' be enclosed by quotes. For example:
+
The syntax for the reference list with a group is:
 +
:{{tlx|reflist|2=group=<var>groupname</var>}}
  
{{pre2|<nowiki>Lorem ipsum dolor sit amet.<ref group=lower-alpha>Footnote 1</ref> Cconsectetur adipisicing elit.<ref group=lower-alpha name=footnote2>Footnote 2</ref>. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<ref group=lower-alpha name=footnote2 />
+
The reference list group name does not need to be enclosed in quotes.
  
{{reflist|group=lower-alpha}}
+
Example:
</nowiki>}}
+
{{markup
 +
|<nowiki>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>
  
Lorem ipsum dolor sit amet.<ref group=lower-alpha>Footnote 1</ref> Cconsectetur adipisicing elit.<ref group=lower-alpha name=footnote2>Footnote 2</ref>. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<ref group=lower-alpha name=footnote2 />
+
==Notes==
 +
{{reflist|group=note}}
  
{{reflist|group=lower-alpha}}
+
==References==
 +
{{reflist}}</nowiki>
 +
|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>
  
'''Issues'''
+
{{fake heading|sub=3|Notes}}
* Backlink labels are always styled as lower alpha. This can be confusing when the footnotes are also labelled alphabetically.
+
{{reflist|group=note}}
* The entries in the reference list will show the default decimal styling if:
 
** The value for {{para|group}} does not exactly match one of the predefined values.
 
** The value for {{para|group}} is enclosed by quotes.
 
** {{tl|Reflist}} is indented with the {{code|:}} markup.
 
** {{tag|references|s}} is used instead of {{tlx|reflist}}
 
  
==Multiple reference lists==
+
{{fake heading|sub=3|References}}
It is possible to include multiple instances of the reference list markup {{tag|references|s}} or {{tl|reflist}} on a page. Care must be taken to ensure that multiple reference lists are closed so that the references intended for one list do not appear in another list. To close the reference list markup, simply use any parameter in the the reference list markup. Normally different reference lists would use different groups, so the reference list markup will be closed.
+
{{reflist}}
 +
}}
  
In this example, the reference list markup is unclosed and the reference list is repeated in the two subsequent lists and the third in-text footnote number is rendered incorrectly:
+
Note that the footnote labels in the reference list show only the numbers and not the group name.
  
{{pre2|<nowiki>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <ref>Reference 1</ref>
+
When using both names and [[#Footnotes:_groups|groups]], the syntax is:
{{reflist}}
 
  
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<ref>Reference 2</ref>
+
:{{tag|ref|params=group="<var>groupname</var>" name="<var>name</var>"|content=Content}}
{{reflist}}
 
  
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.<ref>Reference 3</ref>
+
For the repeated note:
{{reflist}}</nowiki>}}
 
  
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <ref>Reference 1</ref>
+
:{{tag|ref|s|params=group="<var>groupname</var>" name="<var>name</var>"}}
{{reflist}}
 
  
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<ref>Reference 2</ref>
+
==Footnotes: predefined groups==
{{reflist}}
+
{{shortcut|H:PREGROUP|WP:EXPLNOTE}}
 +
{{for|technical details|Help:Cite link labels}}
 +
{{for|Shortened footnotes with explanatory footnotes|Help:Shortened footnotes#Explanatory notes}}
 +
{{See also|Wikipedia:Citing sources#Variation in citation methods|Wikipedia:Manual of Style/Layout#Notes and references}}
 +
<section begin=pregroup /><!--this section is used as the documentation for the efn/notelist templates-->
 +
There are several predefined groups that can have a reference list styled so that the label (a superscripted character within square brackets, e.g., {{dummy ref|1}}) of an [[Help:Explanatory notes|explanatory note]] or citation (aka footnote, reference) matches and links to the note marker label located in the main text and the label in front of the note's text in the appropriate group's list. There can be [[Wikipedia:Citing sources#Separating citations from explanatory footnotes|more than one of these groups' lists]] in the Notes, References and other similarly purposed sections.
  
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.<ref>Reference 3</ref>
+
These predefined note and citation groups have templates that make the [[wikitext]] markup simpler. These templates also allow a standard reference to be inserted, so that an explanatory note can have a reference, or citations can be nested.
{{reflist}}
 
  
{{Reflist hide}}<!-- Ensure the previous refs are closed so they don't mess up the next section-->
+
'''Note:''' If the note's text has a reference name that is used more than once, the labels will still match, but the clickable alpha characters that toggle the note's display will be ''next to'' the note's label, with links to the multiple locations of its marker in the main text. See [[Help:Footnotes#Footnotes: using a source more than once|WP:REFNAME]] and the first point below in [[#Issues|§&nbsp;Issues]].
  
To prevent this and close references so that they are not rendered incorrectly, the reference list markup must include any parameter, such as {{para|group}}, {{para|refs}} or a column parameter. If parameters are not desired, a dummy parameter may be used, by convention {{para|close}}. For example:
+
===Template use by reference group type===
 +
<section begin=pregrouptable />
 +
{| class="wikitable"
 +
|- style="vertical-align:top;"
 +
! Group type !! Footnote marker template<br/>or markup !! Reference list<br/> template !! Sample labels
 +
|-
 +
| ''none'' || {{tag|ref}}
 +
|rowspan=2| {{tlx|reflist}}
 +
|rowspan=2| 1 2 3 4 5 6 7 8 9 10
 +
|-
 +
| ''none'' || {{tlx|refn}} (for nested references)
 +
|-
 +
| lower-alpha || {{tlx|efn}}<br />{{tlx|efn-la}}  || {{tlx|notelist}}<br />{{tlx|notelist-la}} || a b c d e f g h i j
 +
|-
 +
| upper-alpha || {{tlx|efn-ua}} || {{tlx|notelist-ua}} || A B C D E F G H I J
 +
|-
 +
| lower-roman || {{tlx|efn-lr}} || {{tlx|notelist-lr}} || i ii iii iv v vi vii viii ix x
 +
|-
 +
| upper-roman || {{tlx|efn-ur}} || {{tlx|notelist-ur}} || I II III IV V VI VII VIII IX X
 +
|-
 +
| lower-greek || {{tlx|efn-lg}} || {{tlx|notelist-lg}} || α β γ δ ε ζ η θ ι κ
 +
|-
 +
|note || {{tlx|NoteTag}} || {{tlx|NoteFoot}} || note 1 note 2 note 3
 +
|}<section end=pregrouptable />
  
{{pre2|<nowiki>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <ref>Reference 1</ref>
+
* {{tlx|efn}} supports {{para|name}} and {{para|group}}, which work the same as the parameters in {{tag|ref|o}}. Do not enclose values in quotes.
{{reflist|close}}
+
* {{tlx|notelist}} supports the column parameter, {{para|refs}} and {{para|group}}, which work the same as the parameters in {{tlx|reflist}}. Do not enclose values in quotes.
  
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<ref>Reference 2</ref>
+
In these examples, the footnote labels match between the footnote marker and the reference list:
{{reflist|close}}
 
  
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.<ref>Reference 3</ref>
+
{{markup|title=With lower-alpha labels
{{reflist|close}}</nowiki>}}
+
|<nowiki>Lorem ipsum dolor sit amet.{{efn|Footnote 1}} Consectetur adipisicing elit.{{efn|Footnote 2}} Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.{{efn|Footnote 3}}
  
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <ref>Reference 1</ref>
+
{{notelist}}
{{reflist|close}}
+
</nowiki>
 +
|Lorem ipsum dolor sit amet.{{efn|Footnote 1}} Consectetur adipisicing elit.{{efn|Footnote 2}} Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.{{efn|Footnote 3}}
  
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<ref>Reference 2</ref>
+
{{notelist}}
{{reflist|close}}
+
}}
  
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.<ref>Reference 3</ref>
+
{{markup|title=With lower-roman labels
{{reflist|close}}
+
|<nowiki>Lorem ipsum dolor sit amet.{{efn-lr|Footnote 1}} Consectetur adipisicing elit.{{efn-lr|Footnote 2}} Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.{{efn-lr|Footnote 3}}
  
==Embedding references within footnotes==
+
{{notelist-lr}}
{{shortcut|WP:REFNEST}}
+
</nowiki>
Explanatory notes may need to be referenced. Due to limitations in the {{cite.php}} software, reference tags cannot be nested— a set of {{tag|ref}} tags cannot be placed inside another pair of {{tag|ref}} tags; attempting to do so will result in a cite error.
+
|Lorem ipsum dolor sit amet.{{efn-lr|Footnote 1}} Consectetur adipisicing elit.{{efn-lr|Footnote 2}} Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.{{efn-lr|Footnote 3}}
 +
{{notelist-lr}}
 +
}}
  
The [[mw:Help:Magic words|magic word]] {{code|#tag:ref}} may be used to nest references. The markup is:
+
{{markup|title=With named references
 +
|<nowiki>Lorem ipsum dolor sit amet.{{efn|name=fn1|Footnote 1}} Consectetur adipisicing elit.{{efn|Footnote 2}} Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.{{efn|name=fn1}}
  
:<code>&#123;&#123;#tag:ref|<var>refcontent</var>|name=<var>name</var>|group=<var>groupname</var>}}</code>
+
{{notelist}}
 +
</nowiki>
 +
|Lorem ipsum dolor sit amet.{{efn|name=fn1|Footnote 1}} Consectetur adipisicing elit.{{efn|Footnote 2}} Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.{{efn|name=fn1}}
 +
{{notelist}}
 +
}}
  
Where <var>refcontent</var> may include {{tag|ref}} tags. The <var>name</var> and <var>groupname</var> are optional, but must come after <var>refcontent</var>. If the <var>groupname</var> is not specified, then the main and nested references will be rendered into the same reference list. Attempting to use #tag:ref more than once within list-defined references will result in a cite error. The syntax of #tag:ref is not obvious, as parameters must come after the content; {{tl|refn}} may be used in place of the {{code|#tag:ref}} markup.
+
{{markup|title=Named references can also be defined in the notelist
 +
|<nowiki>Lorem ipsum dolor sit amet.{{efn|name=fn1}} Consectetur adipisicing elit.{{efn|name=fn2}} Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.{{efn|name=fn1}}
  
Example:
+
{{notelist|refs=
 +
{{efn|name=fn1|Very long footnote 1}}
 +
{{efn|name=fn2|Very long footnote 2}}
 +
}}
 +
</nowiki>
 +
|Lorem ipsum dolor sit amet.{{efn|name=fn1}} Consectetur adipisicing elit.{{efn|name=fn2}} Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.{{efn|name=fn1}}
 +
{{notelist|refs=
 +
{{efn|name=fn1|Very long footnote 1}}
 +
{{efn|name=fn2|Very long footnote 2}}
 +
}}
 +
}}
  
{{pre2|<nowiki>
+
===Issues===
The quick brown fox jumps over the lazy dog.{{#tag:ref|A footnote.<ref>A reference for the footnote.</ref>|group="nb"}}
+
* Multiple backlink labels (see [[WP:REFNAME]]) are always styled as lower-alpha. This can be confusing when {{tlx|efn}} is used. See the note in the introduction of [[#Footnotes: predefined groups|this section]], above.
 +
* The entries in the reference list will show the default decimal styling if:
 +
** The value for {{para|group}} in {{tlx|reflist}} or {{tag|references|s}} does not exactly match one of the predefined values; use {{tlx|efn}} or variant as {{para|group}} will not be needed.
 +
** The value for {{para|group}} in {{tlx|reflist}} or {{tag|references|s}} is enclosed by quotes; use {{tlx|efn}} or variant as {{para|group}} will not be needed.
 +
** {{tlx|reflist}} is indented with the {{code|:}} markup.
 +
** {{tag|references|s}} is used instead of {{tlx|reflist}}
 +
* The entries in the reference list will have no styling if:
 +
** A reference is included in {{tlx|navbox}} or one of the variants and the style is set to <code>bodyclass=hlist</code>; to resolve this, replace the style with <code>listclass=hlist</code>.<section end=pregroup />
 +
* If the note text contains an "=" sign, precede the note text with {{para|1}}, like this: <code><nowiki>{{efn|name=fn1|1=Very long footnote with an equation, 2+2=4}}</nowiki></code>
  
==Notes==
+
==Reference lists: automatically generated==
{{reflist|group="nb"}}
+
{{main|Help:Automatically generated reference list}}
 +
A page with {{tag|ref|o}} tags but no reference list markup used to display an error, except on talk and user pages. In recent versions of Wikipedia, the error no longer appears; instead an automatically generated reference list (AGRL) is displayed at the bottom of the page.
  
 +
Compared to the reference lists on properly formatted pages, an AGRL can be confusing to both readers and editors. But it is easily corrected by adding reference list markup such as the following. Add it at the position where the reference list would normally appear.
 +
<pre style="width: 10em;">
 
==References==
 
==References==
 
{{reflist}}
 
{{reflist}}
</nowiki>}}
+
</pre>
 
 
The quick brown fox jumps over the lazy dog.{{#tag:ref|A footnote.<ref>A reference for the footnote.</ref>|group="nb"}}
 
  
'''Notes'''
+
On talk pages, the {{tl|reflist-talk}} template can be used to add a reference list to a specific discussion.
{{reflist|group="nb"}}
 
  
'''References'''
+
{{anchor|Citing one book repeatedly with different page numbers}}
{{reflist|close}}
 
==Explanatory notes==
 
{{Seealso|Wikipedia:Citations#Variation in citation methods|Wikipedia:Manual of Style/Layout#Notes and References}}
 
Most footnotes are [[WP:CITE|citations]], which identify sources.  Another kind of footnote is an ''explanatory footnote'' which is a comment that would be too detailed or too awkward to include in the body of the article.    The Wikipedia [[WP:MOS|Manual of style]] does not mandate a layout for explanatory footnotes at the bottom of the article, and in fact provides for [[Wikipedia:Manual_of_Style/Layout#Notes_and_References|several approaches that are acceptable]].  An important factor whether or not ''[[Help:Shortened footnotes|shortened citations]]'' are used or not.    Here are some common approaches to laying out the footnotes.
 
<br/><br/>
 
'''Example A)''' This example puts all citations and explanatory notes into a single Notes sections, and does not use  [[Help:Shortened footnotes|shortened citations]]:
 
  
:{{pre2|<nowiki>
+
==Footnotes: page numbers==
The Sun is pretty big.<ref>Miller, ''The Sun'', Oxford, 2005, p. 23.  But Miller points out that the Sun is not as large as some other stars.</ref>  But the Moon<ref>The Moon goes by other names, such as Selena - see, for example Brown, ''The Moon'', 2006, Penguin, p 623.</ref> is not so big.<ref>Brown, ''The Moon'', 2006, Penguin, p. 46.  Historically the Moon was not always considered to be large.  For a discussion, see Miller, ''The Sun'', Oxford, 2005, p 411.</ref> The Sun is also quite hot.<ref>Smith, ''The Universe'', Random House, 2005, p. 334.</ref>
+
{{main|Help:References and page numbers}}
  
==Notes==
+
Suppose you would like to cite one book, but different facts appear on different pages. You would like to cite the book again and again, but point each fact to the proper page. Suppose one fact is on page 8, a different fact on page 12, a third fact on page 18, a fourth fact on page 241. You could put a line in the "pages" parameter saying "see pages 8, 12, 18, 241" but a fact-checker might have to check all of them before figuring out the right one. Or, you could duplicate the entire citation for the book in each instance, but that would be redundant. One common approach is to use [[Help:Shortened footnotes|shortened citations]], which requires the use of a References section following the footnotes section. A less common approach is to attach a {{tlx|rp|8}} right after the footnote marker and replace the "8" with the appropriate page number.
{{reflist}}
 
</nowiki>}}
 
:Produces a notes section that looks like this:
 
<blockquote style="background:white; padding:1em; border:1px solid #999;"><!--code for display-->
 
The Sun is pretty big.<sup id="nbFoot01c" class="reference">[[#noteFoot01c|[1]]]</sup> But the Moon<sup id="nbFoot02c" class="reference">[[#noteFoot02c|[2]]]</sup> is not so big.<sup id="nbFoot03c" class="reference">[[#noteFoot03c|[3]]]</sup>    The Sun is also quite hot.<sup id="nbFoot04c" class="reference">[[#noteFoot04c|[4]]]</sup><br /><br />
 
<font size="3">'''Notes'''</font>
 
<div class="references-small">
 
<ol class="references">
 
<li id="noteFoot01c"
 
>'''[[#nbFoot01c|^]]''' Miller, ''The Sun'', Oxford, 2005, p. 23.  But Miller points out that the Sun is not as large as some other stars.</li>
 
<li id="noteFoot02c"
 
>'''[[#nbFoot02b|^]]''' The Moon goes by other names, such as Selena - see, for example  Brown, ''The Moon'', 2006, Penguin, p 623.</li>
 
<li id="noteFoot03c"
 
>'''[[#nbFoot03c|^]]''' Brown, ''The Moon'', 2006, Penguin, p. 46.  Historically the Moon was not always considered to be large.  For a discussion, see  Miller,  ''The Sun'', Oxford, 2005, p 411.</li>
 
<li id="noteFoot04c"
 
>'''[[#nbFoot04c|^]]''' Smith, ''The Universe'', Random House, 2005, p. 334.</li>
 
</ol></div>
 
</blockquote>
 
  
'''Example B)''' This example uses [[Help:Shortened footnotes|shortened citations]] (with a References section)  and combines explanatory notes and citations in a Notes section:
+
For example:
  
:{{pre2|<nowiki>
+
{{markup
The Sun is pretty big.<ref>Miller, p. 23. But Miller points out that the Sun is not as large as some other stars.</ref>   But the Moon<ref>The Moon goes by other names, such as Selena - see, for example Brown, p 623.</ref> is not so big.<ref>Brown, p. 46. Historically the Moon was not always considered to be large.  For a discussion, see Miller, p 411.</ref> The Sun is also quite hot.<ref>Smith, p. 334.</ref>
+
|<nowiki>Schudson said the Constitution shaped citizenship in fundamental ways.<ref name="Schudson">{{Cite book |last=Schudson |first=Michael |title=The Good Citizen: A Brief History of American Civic Life |publisher=Simon & Schuster |date=1998 |url=https://books.google.com/books?id=aawMAQAAMAAJ |isbn=0-684-82729-8}}</ref>{{rp|8}} But elections in early American politics did not generate much interest<ref name="Schudson"/>{{rp|12}} while "open discussion of differences" was generally avoided.<ref name="Schudson"/>{{rp|18}} Citizenship later shifted to a polity of essentially "self-absorbed citizens", according to his analysis.<ref name="Schudson"/>{{rp|241}}</nowiki>
 
+
|Schudson said the Constitution shaped citizenship in fundamental ways.<ref name="Schudson">{{Cite book |last=Schudson |first=Michael |title=The Good Citizen: A Brief History of American Civic Life |publisher=Simon & Schuster |date=1998 |url=https://books.google.com/books?id=aawMAQAAMAAJ |isbn=0-684-82729-8}}</ref>{{rp|8}} But elections in early American politics did not generate much interest<ref name="Schudson"/>{{rp|12}} while "open discussion of differences" was generally avoided.<ref name="Schudson"/>{{rp|18}} Citizenship later shifted to a polity of essentially "self-absorbed citizens", according to his analysis.<ref name="Schudson"/>{{rp|241}}
==Notes==
+
{{fake heading|sub=3|References}}
 
{{reflist}}
 
{{reflist}}
 +
}}
  
==References==
+
{{tlx|r}} compactly combines the functions of <code><nowiki><ref></nowiki></code> and {{t|rp}}: <code><nowiki>{{r|Schudson}}</nowiki></code> is equivalent to <code><nowiki><ref name="Schudson"/></nowiki></code> and <code><nowiki>{{r|Schudson|p=241}}</nowiki></code> is equivalent to <code><nowiki><ref name="Schudson"/>{{rp|241}}</nowiki></code>.
* Brown, ''The Moon'', Penguin. 2001.
 
* Miller, ''The Sun'', Oxford, 2005.
 
* Smith, ''The Universe'', Random House, 2005.
 
</nowiki>}}
 
:Produces a notes section that looks like this:
 
<blockquote style="background:white; padding:1em; border:1px solid #999;"><!--code for display-->
 
The Sun is pretty big.<sup id="nbFoot01c" class="reference">[[#noteFoot01c|[1]]]</sup> But the Moon<sup id="nbFoot02c" class="reference">[[#noteFoot02c|[2]]]</sup> is not so big.<sup id="nbFoot03c" class="reference">[[#noteFoot03c|[3]]]</sup>    The Sun is also quite hot.<sup id="nbFoot04c" class="reference">[[#noteFoot04c|[4]]]</sup><br /><br />
 
<font size="3">'''Notes'''</font>
 
<div class="references-small">
 
<ol class="references">
 
<li id="noteFoot01c"
 
>'''[[#nbFoot01c|^]]''' Miller,  p. 23.  But Miller points out that the Sun is not as large as some other stars.</li>
 
<li id="noteFoot02c"
 
>'''[[#nbFoot02b|^]]''' The Moon goes by other names, such as Selena - see, for example  Brown, p 623.</li>
 
<li id="noteFoot03c"
 
>'''[[#nbFoot03c|^]]''' Brown,  p. 46.  Historically the Moon was not always considered to be large.  For a discussion, see Miller, p 411.</li>
 
<li id="noteFoot04c"
 
>'''[[#nbFoot04c|^]]''' Smith,  p. 334.</li>
 
</ol></div>  
 
<font size="3">'''References'''</font>
 
<div class="references-small">
 
<ol class="references">
 
* Brown, ''The Moon'', Penguin. 2001.<br/>
 
*  Miller, ''The Sun'', Oxford, 2005.<br/>
 
*  Smith, ''The Universe'', Random House, 2005.<br/>
 
</ol></div><br />
 
</blockquote>
 
  
'''Example C)''' This example uses  [[Help:Shortened footnotes|shortened citations]] (with a References section) and separates explanatory notes from citations.  Notice that for an article without explanatory notes (in other words, an article with only citations) example B and example C are nearly identical (the only difference is the section names).
+
==Previewing edits==
 +
When you [[Help:Section#Section editing|edit a single section]] of a page, the footnotes list will be visible when you [[Help:Show preview|preview your edits]] under the heading "Preview of references", although you will still not be able to see named references whose definition is outside the section you are editing.
  
:{{pre2|<nowiki>
+
Tools that can be used are the [[user:js/ajaxPreview]] or [[User:Anomie/ajaxpreview.js]] scripts or the [[User:Cacycle/wikEd|wikEd]] gadget.
The Sun is pretty big.<ref>Miller, p. 23.</ref><ref group= "Note">  But Miller points out that the Sun is not as large as some other stars.</ref>  But the Moon<ref group="Note">The Moon goes by other names, such as Selena - see, for example Brown, p 623.</ref> is not so big.<ref>Brown, p. 46.</ref><ref group="Note"> Historically the Moon was not always considered to be large.  For a discussion, see Miller, p 411.</ref> The Sun is also quite hot.<ref>Smith, p. 334.</ref>
 
  
==Notes==
+
==RefToolbar==
{{reflist|group="note"}}
+
{{main|Wikipedia:RefToolbar/2.0}}
 +
[[File:Cite web named ref 01.png|thumb|400px|Using the citation toolbar to name the first reference.]]
 +
[[File:Citation toolbar named ref.png|thumb|400px|Using the citation toolbar to insert additional references to the first source.]]
 +
You can use the citation toolbar to name references. When you first create a reference, you can enter a value in the "Ref name" box. When you want to reuse this reference, click the "Named references" button on the citation toolbar and choose which reference you would like to insert.
 +
{{clear}}
  
==Citations==
+
==Issues and limitations==
{{reflist}}
+
* {{cite.php|bug}}
 +
* [[Help:Substitution|subst:]] does not work within {{tag|ref|o}} tags. {{phab|T4700}}
 +
* The [[Help:Pipe trick|pipe trick]] does not work within {{tag|ref|o}} tags. {{phab|T4700}}
  
==References==
 
* Brown, ''The Moon'', Penguin. 2001.
 
* Miller, ''The Sun'', Oxford, 2005.
 
* Smith, ''The Universe'', Random House, 2005.
 
</nowiki>}}
 
  
:Produces a notes section that looks like this:
+
== Flagging inadequate referencing ==
 
+
{{See also | Template: Unreferenced/doc#Usage}}
<blockquote style="background:white; padding:1em; border:1px solid #999;"><!--code for display-->
+
* The template {{Tlx|Refimprove}} should be added to articles where there are '''some, but insufficient, inline citations to support the material''' currently in the article. For [[WP:BLP|biographies of living persons]], use {{tlx|BLP sources}} instead.
The Sun is pretty big.<sup id="nbFoot01d" class="reference">[[#noteFoot01d|[1]]]</sup><sup id="nbFoot01e" class="reference">[[#noteFoot01e|[Note 1]]]</sup>  But the Moon<sup id="nbFoot02e" class="reference">[[#noteFoot02e|[Note 2]]]</sup> is not so big.<sup id="nbFoot02d" class="reference">[[#noteFoot02d|[2]]]</sup><sup id="nbFoot03e" class="reference">[[#noteFoot03e|[Note 3]]]</sup> The Sun is also quite hot.<sup id="nbFoot03d" class="reference">[[#noteFoot03d|[3]]]</sup><br /><br />
+
* The template {{Tlx|Unreferenced}} should be added to articles with '''no references at all'''. For biographies of living persons, use {{tlx|BLP unsourced}} instead.
<font size="3">'''Notes'''</font>
+
* The template {{Tlx|Unreferenced section}} is for '''individual sections that have no citations''' in articles that have at least one citation somewhere else. For biographies of living persons, use {{tlx|BLP unsourced section}} instead.
<div class="references-small">
+
* The template {{Tlx|Medref}} is specifically for articles '''needing additional ''medical'' references'''.
<ol class="references">
 
<li id="noteFoot01e"
 
>'''[[#nbFoot01e|^]]''' But Miller points out that the Sun is not as large as some other stars.</li>
 
<li id="noteFoot02e"
 
>'''[[#nbFoot02e|^]]''' The Moon goes by other names, such as Selena - see, for example  Brown,  p 623.</li>
 
<li id="noteFoot03e"
 
>'''[[#nbFoot03e|^]]''' Historically the Moon was not always considered to be large. For a discussion, see  Miller, p 411.</li>
 
</ol></div><br />
 
<font size="3">'''Citations'''</font>
 
<div class="references-small">
 
<ol class="references">
 
<li id="noteFoot01d"
 
>'''[[#nbFoot01d|^]]''' Miller,  p. 23</li>
 
<li id="noteFoot02d"
 
>'''[[#nbFoot02d|^]]'''  Brown, p. 46</li>
 
<li id="noteFoot03d"
 
>'''[[#nbFoot03d|^]]'''  Smith, p. 334</li>
 
</ol></div><br />
 
<font size="3">'''References'''</font>
 
<div class="references-small">
 
<ol class="references">
 
* Brown, ''The Moon'', Penguin. 2001.<br/>
 
*  Miller, ''The Sun'', Oxford, 2005.<br/>
 
*  Smith, ''The Universe'', Random House, 2005.<br/>
 
</ol></div><br />
 
</blockquote>
 
 
 
== See also ==
 
* [[mw:Extension:Cite/Cite.php]]
 
* [[Help:Cite link labels]]
 
  
 +
==See also==
 +
* [[Template:Harvard citation#Using CITEREF directly]] and {{tl|sfnref}}
 +
* [[Wikipedia:Citing sources/Further considerations]]—a how-to article with some additional considerations for citing sources
 +
* [[Wikipedia:Help desk]]—to ask questions about using footnotes in articles if you were not able to find the information you need on this help page.
 +
*[[Template:Editor tools]]—{{tl|Editor tools}}
 
{{Wikipedia referencing}}
 
{{Wikipedia referencing}}
 +
{{Help navigation}}
  
[[Category:Editor handbook]]
+
[[Category:Wikipedia editor help]]
 
+
[[Category:Wikipedia citation administration]]
[[ca:Ajuda:Notes a peu de pàgina]]
 
[[de:Hilfe:Einzelnachweise]]
 
[[eo:Helpo:Referencoj kaj piednotoj]]
 
[[fr:Aide:Note]]
 
[[id:Bantuan:Catatan kaki]]
 
[[it:Aiuto:Note]]
 
[[nl:Help:Referenties en voetnoten]]
 
[[pt:Wikipedia:Livro de estilo/Notas de rodapé]]
 
[[ja:Help:脚注]]
 
[[pl:Pomoc:Przypisy]]
 
[[sk:Pomoc:Referencie]]
 
[[sr:Помоћ:Фусноте]]
 
[[tr:Yardım:Dipnotlar]]
 

Latest revision as of 16:27, 6 September 2020

[[Category:Template:Pagetype with short description]]

Template:Wikipedia how to

This page explains how to create the Footnotes section for Wikipedia articles. In this context, the word "Footnotes" refers to the Wikipedia-specific manner of documenting an article's sources and providing tangential information, and should not be confused with the general concept of footnotes. This how-to does not cover the formatting of citations within the Footnotes section, which is reviewed in Citing sources.

Footnotes are used most commonly to provide:

The use of Footnotes is only one of several options for providing source information in the article. Other systems of inline citation, including Shortened footnotes and Parenthetical referencing, may be used at the editor's discretion in accordance with the guideline on Variation in citation methods.

Only certain types of material on the English Wikipedia are required to have an inline citation. There is no requirement to provide a citation for every sentence, because multiple sentences may be supported by the same footnote. For advice on which material should be cited, see the guidelines on When you must use inline citations, the Good article criteria and When to cite. For advice on how to organize and format bibliographic citations, see the guideline on Citing sources and examples of Citation templates.

Footnotes are created using the Cite software extension. This extension adds the HTML-like elements <ref>...</ref>, <references /> and <references>...</references>. The elements are also used in a number of templates; for example, it is becoming more common to use {{reflist}} rather than <references /> as it can style the reference list.

Overview

Template:VE documentation The Footnotes 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. If you are using the desktop site and have Javascript enabled, then hovering your cursor over a footnote marker (or touching it on touch devices) will show a pop-up box containing the footnote.
  • 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 caret (^) 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 shown as letters:
2. ^ a b c Citation
Clicking on the backlink or pressing Alt+ returns to the footnote marker.

Footnotes in action

The superscript numeral "1" in square brackets at the end of this sentence is an example of a footnote marker.[1]

  1. This is a footnote that contains a citation or note.

Footnotes: the basics

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 Renders as
This is page content.<ref>''LibreOffice For Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref>
{{reflist}}

This is page content.[1]

  1. LibreOffice For Starters, First Edition, Flexible Minds, Manchester, 2002, p. 18
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.

Ref tags should follow any punctuation (usually a period), not precede it; see WP:REFPUNC. There should be no space between the punctuation and the tag:

Markup Renders as
...text.<ref>Content of the reference</ref>
{{reflist}}

...text.[1]     Right

  1. Content of the reference
...text<ref>Content of the reference</ref>.
{{reflist}}

...text[1].     Wrong (tag before punctuation)

  1. Content of the reference
...text. <ref>Content of the reference</ref>
{{reflist}}

...text. [1]     Wrong (space before tag)

  1. Content of the reference

The content of the ref tags can be formatted using most wikimarkup or HTML markup, although techniques such as the pipe trick and template substitution will not work in footnotes. For example:

Markup Renders as
This is page content.<ref>''LibreOffice For Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref>
{{reflist}}

This is page content.[1]

  1. LibreOffice For Starters, First Edition, Flexible Minds, Manchester, 2002, p. 18

The ref tag content may also contain an internal or external link:

Markup Renders as
This is page content.<ref>''[http://www.example.org LibreOffice For Starters]'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref>
{{reflist}}

This is page content.[1]

  1. LibreOffice For Starters, First Edition, Flexible Minds, Manchester, 2002, p. 18

URLs must begin with a supported URI scheme. http:// and https:// will be supported by all browsers; however, ftp://, gopher://, irc://, ircs://, mailto: and news: may require a plug-in or an external application and should normally be avoided. IPv6 host-names are currently not supported.

If URLs in citation template parameters contain certain characters, then they will not display and link correctly. Those characters need to be percent-encoded. For example, a space must be replaced by %20. To encode the URL, replace the following characters with:

sp " ' < > [ ] { | }
%20 %22 %27 %3c %3e %5b %5d %7b %7c %7d

Single apostrophes do not need to be encoded; however, unencoded multiples will be parsed as italic or bold markup. Single curly closing braces also do not need to be encoded; however, an unencoded pair will be parsed as the double closing braces for the template transclusion.

Reference lists: the basics

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", "Notes" or the like.

Markup Renders as
This is page content.<ref>''LibreOffice For Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref>

==References==
{{reflist}}

This is page content.[1]

References
  1. LibreOffice For Starters, First Edition, Flexible Minds, Manchester, 2002, p. 18

Notes

  • In some cases, a page has more than one reference list. Until 2014, multiple uses of {{reflist}} on the same page required use of a |close= parameter; that bug has been fixed and the|close= parameter may safely be removed.
  • When editing, <references /> may be seen instead of {{reflist}}. This is valid, but <references /> does not offer the advanced features of {{reflist}}.

Footnotes: using a source more than once

You can cite the same source more than once on a page by using named footnotes. 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. Please do not use raNdOM capitalization.
  • Names must not be purely numeric; the software will accept something like ":1" (which is punctuation plus a number), but it will ignore "1" (purely numeric).
  • Names should have semantic value, so that they can be more easily distinguished from each other by human editors who are looking at the wikitext. This means that ref names like "Nguyen 2010" are preferred to names like ":1".
  • Names must be unique. You may not use the same name to define different groups or footnotes.
  • Please consider keeping reference names simple and restricted to the standard English alphabet and numerals. Failing that, if spaces are used, including the following technical restrictions becomes relevant:
    • Quotation marks are preferred but optional if the only characters used are letters A–Z, a–z, digits 0–9, and the symbols !$%&()*,-.:;<@[]^_`{|}~. That is, all printable ASCII characters except #"'/=>?\.
    • Inclusion of any other characters, including spaces, requires that the reference name be enclosed in quotes; for example, name="John Smith".
    • The quote marks must be the standard, straight, double quotation marks ("); curly or other quotes will be parsed as part of the reference name.
    • Quote-enclosed reference names may not include a less-than sign (<) or a double straight quote symbol ("). These may be escaped with &lt; and &quot;, respectively.
  • You may optionally provide reference names even when the reference name is not required. This makes later re-use of the sourced reference easier.
Markup Renders as
This is page content.<ref name="manchester2002">''LibreOffice for Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref> This is more content.<ref name="manchester2002" />
{{reflist}}

This is page content.[1] This is more content.[1]

  1. 1.0 1.1 LibreOffice for Starters, First Edition, Flexible Minds, Manchester, 2002, p. 18

The actual name used can be almost anything, but it is recommended that it have a connection to the citation or note. A common practice is to use the author-year or publisher-year for the reference name. This helps editors remember the name, by associating it with the information that is visible to the reader.

Note that the footnote labels are incremented in the order they are used, and that they use the same label when reused, thus the labels can seem out of order:

Markup Renders as
This is starter content.<ref name="manchester2002">''LibreOffice for Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref> This is expert content.<ref name="lexington2004">''OpenOffice for Experts'', Lexington, 2004, p. 18</ref> And more starter content.<ref name="manchester2002" /> And more expert content.<ref name="lexington2004" />
{{reflist}}

This is starter content.[1] This is expert content.[2] And more starter content.[1] And more expert content.[2]

  1. 1.0 1.1 LibreOffice for Starters, First Edition, Flexible Minds, Manchester, 2002, p. 18
  2. 2.0 2.1 OpenOffice for Experts, Lexington, 2004, p. 18

When using both names and groups, the syntax is:

<ref group="groupname" name="name">Content</ref>

Care should be taken when deleting references to avoid creating a cite error. See Avoiding common mistakes

Reference lists: columns

When using {{reflist}}, the list can be split into columns.

{{reflist|xxem}} where xx is the column width in em.

By setting the width in em, the number of columns will automatically be adjusted to the width of the display. It should be used only when necessary, as the template has built-in auto-formatting capabilities providing a useful display in most scenarios by itself.

The set columns feature is now deprecated in favor of the option described above, which is better suited to flexible formatting for a variety of display screen sizes, ranging from mobile phones and tablets to wide-screen "cinema" displays. Forcing a fixed number of columns has been disabled in mobile view.

The number of columns to use is up to the editor, but some major practices include:

For example: Using {{Reflist|30em}} will create columns with a minimum width of 30 em,

30em wide columns
Markup Renders as
Lorem ipsum.<ref>Source name, access date, etc.</ref>

Lorem ipsum dolor sit amet.<ref>Source name, access date, etc.</ref>

==References==
{{Reflist|30em}}

Lorem ipsum.[1] Lorem ipsum dolor sit amet.[2]

References
  1. Source name, access date, etc.
  2. Source name, access date, etc.

List-defined references

Some or all of the footnotes can also be defined within the reference section/list, and invoked in the page content. This keeps those citations in one central location for easier maintenance and avoids cluttering the text. This is purely a source code changeTemplate:Sndthe actual display of the citation in the text to a reader is unaffected. For a more detailed evaluation of this method, see WP:LDRHOW. The syntax is:

{{reflist|refs=
<ref name="name1">Content</ref>
<ref name="name2">Content</ref>
<ref name="name...n">Content</ref>
}}

or, alternatively,

<references>
<ref name="name1">Content</ref>
<ref name="name2">Content</ref>
<ref name="name...n">Content</ref>
</references>

The footnote markers are included as usual for a named footnote. For example:

Markup Renders as
The quick brown fox jumps over the lazy dog.<ref name="LazyDog"/>
Amazingly few discotheques provide jukeboxes.<ref name="Jukeboxes"/>
How razorback-jumping frogs can level six piqued gymnasts.<ref name="JumpingFrogs"/>

==References==
{{reflist|
refs=
<ref name="Jukeboxes">This is the jukeboxes reference.</ref>
<ref name="LazyDog">This is the lazy dog 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 can level six piqued gymnasts.[3]

References
  1. This is the lazy dog reference.
  2. This is the jukeboxes reference.
  3. This is the jumping frogs reference.

The references will be numbered, and appear in the output, in the order that they are first referred to in the content, regardless of their order within the list. All references in reference list must be referenced in the content, otherwise an error message will be shown.

Note that when you use the visual editor, you will not be able to add, remove, or change list-defined references.

Footnotes: embedding references

Explanatory notes may need to be referenced. Because of limitations in the Cite software, reference tags cannot be nested; that is, a set of <ref>...</ref> tags cannot be placed inside another pair of <ref>...</ref> tags. Attempting to do so will result in a cite error.

The template {{refn}} may be used to nest references. The markup is:

{{refn|group=group|name=name|content}} name and group being optional parameters. The content may include <ref> tags.

The other templates listed below in Predefined groups are variants of {{refn}} that include a styled group and have a matching styled reference list template.

Example:

Markup Renders as
The quick brown fox jumps over the lazy dog.{{refn|group=nb|A footnote.<ref>A reference for the footnote.</ref>}}

==Notes==
{{reflist|group=nb}}

==References==
{{reflist}}

The quick brown fox jumps over the lazy dog.[nb 1]

Notes
  1. A footnote.[1]
References
  1. A reference for the footnote.

The use of the magic word #tag:ref is valid, but the sequence of parameters is invariant and nonintuitive. {{refn}} and its variants use this markup internally.

{{#tag:ref|refcontent|group=groupname|name=name}}

Footnotes: 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, infoboxes and navboxes. 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>

The footnote marker group name must be enclosed in quotes if the group name includes a space, else a cite error will occur, otherwise quotes are optional.

The syntax for the reference list with a group is:

{{reflist|group=groupname}}

The reference list group name does not need to be enclosed in quotes.

Example:

Markup Renders as
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
  1. Listed separately from the citation
  2. Another note
References
  1. Citation.

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" />

Footnotes: predefined groups

<section begin=pregroup /> There are several predefined groups that can have a reference list styled so that the label (a superscripted character within square brackets, e.g., [1]) of an explanatory note or citation (aka footnote, reference) matches and links to the note marker label located in the main text and the label in front of the note's text in the appropriate group's list. There can be more than one of these groups' lists in the Notes, References and other similarly purposed sections.

These predefined note and citation groups have templates that make the wikitext markup simpler. These templates also allow a standard reference to be inserted, so that an explanatory note can have a reference, or citations can be nested.

Note: If the note's text has a reference name that is used more than once, the labels will still match, but the clickable alpha characters that toggle the note's display will be next to the note's label, with links to the multiple locations of its marker in the main text. See WP:REFNAME and the first point below in § Issues.

Template use by reference group type

<section begin=pregrouptable />

Group type Footnote marker template
or markup
Reference list
template
Sample labels
none <ref>...</ref> {{reflist}} 1 2 3 4 5 6 7 8 9 10
none {{refn}} (for nested references)
lower-alpha {{efn}}
{{efn-la}}
{{notelist}}
{{notelist-la}}
a b c d e f g h i j
upper-alpha {{efn-ua}} {{notelist-ua}} A B C D E F G H I J
lower-roman {{efn-lr}} {{notelist-lr}} i ii iii iv v vi vii viii ix x
upper-roman {{efn-ur}} {{notelist-ur}} I II III IV V VI VII VIII IX X
lower-greek {{efn-lg}} {{notelist-lg}} α β γ δ ε ζ η θ ι κ
note {{NoteTag}} {{NoteFoot}} note 1 note 2 note 3

<section end=pregrouptable />

  • {{efn}} supports |name= and |group=, which work the same as the parameters in <ref>. Do not enclose values in quotes.
  • {{notelist}} supports the column parameter, |refs= and |group=, which work the same as the parameters in {{reflist}}. Do not enclose values in quotes.

In these examples, the footnote labels match between the footnote marker and the reference list:

With lower-alpha labels
Markup Renders as
Lorem ipsum dolor sit amet.{{efn|Footnote 1}} Consectetur adipisicing elit.{{efn|Footnote 2}} Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.{{efn|Footnote 3}}

{{notelist}}

Lorem ipsum dolor sit amet.[lower-alpha 1] Consectetur adipisicing elit.[lower-alpha 2] Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.[lower-alpha 3]

  1. Footnote 1
  2. Footnote 2
  3. Footnote 3
With lower-roman labels
Markup Renders as
Lorem ipsum dolor sit amet.{{efn-lr|Footnote 1}} Consectetur adipisicing elit.{{efn-lr|Footnote 2}} Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.{{efn-lr|Footnote 3}}

{{notelist-lr}}

Lorem ipsum dolor sit amet.[lower-roman 1] Consectetur adipisicing elit.[lower-roman 2] Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.[lower-roman 3] Template:Notelist-lr

With named references
Markup Renders as
Lorem ipsum dolor sit amet.{{efn|name=fn1|Footnote 1}} Consectetur adipisicing elit.{{efn|Footnote 2}} Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.{{efn|name=fn1}}

{{notelist}}

Lorem ipsum dolor sit amet.[lower-alpha 1] Consectetur adipisicing elit.[lower-alpha 2] Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.[lower-alpha 1]

  1. 1.0 1.1 Footnote 1
  2. Footnote 2
Named references can also be defined in the notelist
Markup Renders as
Lorem ipsum dolor sit amet.{{efn|name=fn1}} Consectetur adipisicing elit.{{efn|name=fn2}} Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.{{efn|name=fn1}}

{{notelist|refs=
{{efn|name=fn1|Very long footnote 1}}
{{efn|name=fn2|Very long footnote 2}}
}}

Lorem ipsum dolor sit amet.[lower-alpha 1] Consectetur adipisicing elit.[lower-alpha 2] Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.[lower-alpha 1]

  1. 1.0 1.1 Very long footnote 1
  2. Very long footnote 2

Issues

  • Multiple backlink labels (see WP:REFNAME) are always styled as lower-alpha. This can be confusing when {{efn}} is used. See the note in the introduction of this section, above.
  • The entries in the reference list will show the default decimal styling if:
    • The value for |group= in {{reflist}} or <references /> does not exactly match one of the predefined values; use {{efn}} or variant as |group= will not be needed.
    • The value for |group= in {{reflist}} or <references /> is enclosed by quotes; use {{efn}} or variant as |group= will not be needed.
    • {{reflist}} is indented with the : markup.
    • <references /> is used instead of {{reflist}}
  • The entries in the reference list will have no styling if:
    • A reference is included in {{navbox}} or one of the variants and the style is set to bodyclass=hlist; to resolve this, replace the style with listclass=hlist.<section end=pregroup />
  • If the note text contains an "=" sign, precede the note text with |1=, like this: {{efn|name=fn1|1=Very long footnote with an equation, 2+2=4}}

Reference lists: automatically generated

A page with <ref> tags but no reference list markup used to display an error, except on talk and user pages. In recent versions of Wikipedia, the error no longer appears; instead an automatically generated reference list (AGRL) is displayed at the bottom of the page.

Compared to the reference lists on properly formatted pages, an AGRL can be confusing to both readers and editors. But it is easily corrected by adding reference list markup such as the following. Add it at the position where the reference list would normally appear.

==References==
{{reflist}}

On talk pages, the {{reflist-talk}} template can be used to add a reference list to a specific discussion.

Footnotes: page numbers

Suppose you would like to cite one book, but different facts appear on different pages. You would like to cite the book again and again, but point each fact to the proper page. Suppose one fact is on page 8, a different fact on page 12, a third fact on page 18, a fourth fact on page 241. You could put a line in the "pages" parameter saying "see pages 8, 12, 18, 241" but a fact-checker might have to check all of them before figuring out the right one. Or, you could duplicate the entire citation for the book in each instance, but that would be redundant. One common approach is to use shortened citations, which requires the use of a References section following the footnotes section. A less common approach is to attach a {{rp|8}} right after the footnote marker and replace the "8" with the appropriate page number.

For example:

Markup Renders as
Schudson said the Constitution shaped citizenship in fundamental ways.<ref name="Schudson">{{Cite book |last=Schudson |first=Michael |title=The Good Citizen: A Brief History of American Civic Life |publisher=Simon & Schuster |date=1998 |url=https://books.google.com/books?id=aawMAQAAMAAJ |isbn=0-684-82729-8}}</ref>{{rp|8}} But elections in early American politics did not generate much interest<ref name="Schudson"/>{{rp|12}} while "open discussion of differences" was generally avoided.<ref name="Schudson"/>{{rp|18}} Citizenship later shifted to a polity of essentially "self-absorbed citizens", according to his analysis.<ref name="Schudson"/>{{rp|241}}

Schudson said the Constitution shaped citizenship in fundamental ways.[1]Template:Rp But elections in early American politics did not generate much interest[1]Template:Rp while "open discussion of differences" was generally avoided.[1]Template:Rp Citizenship later shifted to a polity of essentially "self-absorbed citizens", according to his analysis.[1]Template:Rp

References
  1. 1.0 1.1 1.2 1.3 Schudson, Michael (1998). The Good Citizen: A Brief History of American Civic Life. Simon & Schuster. ISBN 0-684-82729-8.

{{r}} compactly combines the functions of <ref> and Template:T: {{r|Schudson}} is equivalent to <ref name="Schudson"/> and {{r|Schudson|p=241}} is equivalent to <ref name="Schudson"/>{{rp|241}}.

Previewing edits

When you edit a single section of a page, the footnotes list will be visible when you preview your edits under the heading "Preview of references", although you will still not be able to see named references whose definition is outside the section you are editing.

Tools that can be used are the user:js/ajaxPreview or User:Anomie/ajaxpreview.js scripts or the wikEd gadget.

RefToolbar

Using the citation toolbar to name the first reference.
Using the citation toolbar to insert additional references to the first source.

You can use the citation toolbar to name references. When you first create a reference, you can enter a value in the "Ref name" box. When you want to reuse this reference, click the "Named references" button on the citation toolbar and choose which reference you would like to insert.

Issues and limitations


Flagging inadequate referencing

  • The template {{Refimprove}} should be added to articles where there are some, but insufficient, inline citations to support the material currently in the article. For biographies of living persons, use {{BLP sources}} instead.
  • The template {{Unreferenced}} should be added to articles with no references at all. For biographies of living persons, use {{BLP unsourced}} instead.
  • The template {{Unreferenced section}} is for individual sections that have no citations in articles that have at least one citation somewhere else. For biographies of living persons, use {{BLP unsourced section}} instead.
  • The template {{Medref}} is specifically for articles needing additional medical references.

See also


Cite error: <ref> tags exist for a group named "lower-roman", but no corresponding <references group="lower-roman"/> tag was found, or a closing </ref> is missing