Help:Footnotes: Difference between revisions

Note per issues people have had on Template talk:Notelist
(removed parenthetical referencing from the lead since it was deprecated in September 2020 per Special:PermanentLink/976895063#Deprecate parenthetical citations)
 
imported>HTGS
(Note per issues people have had on Template talk:Notelist)
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
{{For|help with citation templates|Help:Citation Style 1}}
{{For|help with citation templates|Help:Citation Style 1}}
{{Redirect|WP:FN|the fringe theories noticeboard|Wikipedia:Fringe theories/Noticeboard}}
{{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}}
{{Redirect|WP:NOTES|hatnotes|Wikipedia:Hatnote|article layout of footnotes|MOS:NOTES|musical notes|Wikipedia:Manual of Style/Music#Images and notation}}
{{Wikipedia how to|H:FOOT|WP:FOOTNOTES|WP:FN}}
{{Wikipedia how to|H:FOOT|WP:FOOTNOTES|H:FN}}


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 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]].
Line 10: Line 10:
Footnotes are used most commonly to provide:
Footnotes are used most commonly to provide:
* [[Wikipedia:Citing sources|references (bibliographic citations) to reliable sources]],
* [[Wikipedia:Citing sources|references (bibliographic citations) to reliable sources]],
* explanatory information or
* [[Help:explanatory notes|explanatory information]], or
* source information for tables and other elements.
* source information for tables and other elements.


Line 39: Line 39:


==Footnotes: the basics==
==Footnotes: the basics==
{{See also|Help:Reftags}}
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:
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:


Line 48: Line 51:
}}
}}


:The {{tl|reflist}} template will be explained in the next section.
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.
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:
===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
{{markup
Line 69: Line 73:
}}
}}


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:
===Formatting ref tags===
The content of the ref tags can be formatted using most wiki markup 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
{{markup
Line 106: Line 111:
{{shortcut|HELP:MULTIREF}}
{{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.
* 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}}.
*When editing, {{tag|references|s}} may be seen instead of {{tl|reflist}}. This will automatically display the references in multiple columns, but {{tag|references|s}} does not offer the other advanced features of {{tl|reflist}}.


{{anchor|Naming a ref tag so it can be used more than once|Footnote markers: using a source more than once}}
{{anchor|Naming a ref tag so it can be used more than once|Footnote markers: using a source more than once}}
Line 122: Line 127:


{{refname rules}}
{{refname rules}}
Note that the colon-followed-by-numeral names, like <code>":0"</code>, are currently [[Wikipedia:Village_pump_(technical)/Archive_173#VisualEditor_creating_bad_ref_names|generated by default]] in [[WP:VE|VisualEditor]].


{{markup
{{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" />
|<nowiki>This is page content.<ref name="manchester2002">{{cite book|title=LibreOffice for Starters|edition=First|publisher=Flexible Minds|location=Manchester|year=2002|p=18}}</ref> This is more content.<ref name="manchester2002" />
{{reflist}}</nowiki>
{{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" />
|This is page content.<ref name="manchester2002">{{cite book|title=LibreOffice for Starters|edition=First|publisher=Flexible Minds|location=Manchester|year=2002|p=18}}</ref> This is more content.<ref name="manchester2002" />
{{reflist}}
{{reflist}}
}}
}}
Line 134: Line 141:
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:
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
{{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" />
|<nowiki>This is starter content.<ref name="manchester2002">{{cite book|title=LibreOffice for Starters|edition=First|publisher=Flexible Minds|location=Manchester|year=2002|p=18}}</ref> This is expert content.<ref name="lexington2004">{{cite book|title=OpenOffice for Experts|publisher=Lexington|year=2004|p=18}}</ref> And more starter content.<ref name="manchester2002" /> And more expert content.<ref name="lexington2004" />
{{reflist}}</nowiki>
{{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" />
|This is starter content.<ref name="manchester2002">{{cite book|title=LibreOffice for Starters|edition=First|publisher=Flexible Minds|location=Manchester|year=2002|p=18}}</ref> This is expert content.<ref name="lexington2004">{{cite book|title=OpenOffice for Experts|publisher=Lexington|year=2004|p=18}}</ref> And more starter content.<ref name="manchester2002" /> And more expert content.<ref name="lexington2004" />
{{reflist}}
{{reflist}}
}}
}}
Line 142: Line 149:
When using both names and [[#Footnotes:_groups|groups]], the syntax is:
When using both names and [[#Footnotes:_groups|groups]], the syntax is:
:{{tag|ref|params=group="<var>groupname</var>" name="<var>name</var>"|content=Content}}
:{{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]]
Care should be taken when deleting references to avoid creating a cite error. See [[Wikipedia:Avoiding common mistakes#Deleting...|Avoiding common mistakes]].


==Reference lists: columns==
==Reference lists: columns==
{{shortcut|H:REFCOLS}}
{{shortcut|H:REFCOLS}}
{{hatnote|Columns are not supported by Internet Explorer 9 and below; see {{tl|reflist}} for technical details}}
{{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.
When using {{tag|references|s}} or {{tl|reflist}}, the list can be split into columns. The {{tag|references|s}} tag provides a default column width of 30 [[em (typography)|em]].  {{tl|Reflist}} can be used to set a different column width:
:{{tlx|reflist|<var>xx</var>em}} where <var>xx</var> is the column width in [[em (typography)|em]].
:{{tlx|reflist|<var>xx</var>em}}, where <var>xx</var> 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 number of columns will automatically be adjusted to the width of the display. It should be used only when necessary, as both the tag and the template have built-in auto-formatting capabilities providing a useful default display in most scenarios.


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.
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.


The number of columns to use is up to the editor, but some major practices include:
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|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)}}.
* {{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)}}.
Line 205: Line 211:


==References==
==References==
{{reflist|
{{reflist|refs=
refs=
<ref name="Jukeboxes">This is the jukeboxes reference.</ref>
<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>
Line 216: Line 221:


{{fake heading|sub=3|References}}
{{fake heading|sub=3|References}}
{{reflist|
{{reflist|refs=
refs=
<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="Jukeboxes">This is the jukeboxes reference.</ref>
Line 236: Line 240:
[[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.
[[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.


The template {{tl|refn}} may be used to nest references. The markup is:
The templates {{tl|r}} and {{tl|refn}} can be used to nest references. The markup is:


:{{tlx|refn|2=group=group|3=name=name|4=content}} ''name'' and ''group'' being optional parameters. The content may include {{tag|ref|o}} tags.
:{{tlx|refn|2=group=''group''|3=name=''name''|4=''content''}} or
:{{tlx|r|2=group=''group''|3=name=''name''|4=refn=''content''}} or
:{{tlx|r|2=g=''group''|3=n=''name''|4=r=''content''}} (shorter)
''name'' and ''group'' being optional parameters. The ''content'' may include {{tag|ref|o}} tags or another {{tl|r}} template.


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.
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.


Example:
Examples:


===Using {{tl|refn}}===
{{markup
{{markup
|<nowiki>The quick brown fox jumps over the lazy dog.{{refn|group=nb|A footnote.<ref>A reference for the footnote.</ref>}}
|<nowiki>The quick brown fox jumps over the lazy dog.{{refn|group=nb|A footnote.<ref>A reference for the footnote.</ref>}}
Line 262: Line 270:
}}
}}


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.
===Using {{tl|r}}===
{{markup
|<nowiki>The quick brown fox jumps over the lazy dog.{{r|g=nb|r=A footnote.{{r|r=A reference for the footnote.}}}}
 
==Notes==
{{reflist|group=nb}}
 
==References==
{{reflist}}
</nowiki>
|The quick brown fox jumps over the lazy dog.{{r|g=nb|r=A footnote.{{r|r=A reference for the footnote.}}}}
 
{{fake heading|sub=3|Notes}}
{{reflist|group=nb}}
 
{{fake heading|sub=3|References}}
{{reflist}}
}}
 
The use of the magic word <code>#tag:ref</code> is valid, but the sequence of parameters is invariant and nonintuitive. {{tl|r}} as well as {{tl|refn}} and its variants use this markup internally.


:<code>&#123;&#123;#tag:ref|<var>refcontent</var>|group=<var>groupname</var>|name=<var>name</var>}}</code>
:<code>&#123;&#123;#tag:ref|<var>refcontent</var>|group=<var>groupname</var>|name=<var>name</var>}}</code>
Line 302: Line 329:
Note that the footnote labels in the reference list show only the numbers and not the group name.
Note that the footnote labels in the reference list show only the numbers and not the group name.


When using both names and [[#Footnotes:_groups|groups]], the syntax is:
When using both names and groups, the syntax is:


:{{tag|ref|params=group="<var>groupname</var>" name="<var>name</var>"|content=Content}}
:{{tag|ref|params=group="<var>groupname</var>" name="<var>name</var>"|content=Content}}
Line 315: Line 342:
{{for|Shortened footnotes with explanatory footnotes|Help:Shortened footnotes#Explanatory notes}}
{{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}}
{{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-->
<section begin=pregroup /><!--this section is used as the documentation for the efn/notelist templates-->{{anchor|footnotes_predefined_groups}}
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.
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.


Line 328: Line 355:
! Group type !! Footnote marker template<br/>or markup !! Reference list<br/> template !! Sample labels
! Group type !! Footnote marker template<br/>or markup !! Reference list<br/> template !! Sample labels
|-
|-
| ''none'' || {{tag|ref}}
|rowspan=3|''none by default, but optionally any'' || {{tag|ref}}
|rowspan=2| {{tlx|reflist}}
|rowspan=3| {{tlx|reflist}}
|rowspan=2| 1 2 3 4 5 6 7 8 9 10
|rowspan=3| 1 2 3 4 5 6 7 8 9 10
|-
| {{tlx|r}} (for nested references)
|-
|-
| ''none'' || {{tlx|refn}} (for nested references)
| {{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
| lower-alpha || {{tlx|efn}}<br />{{tlx|efn-la}}  || {{tlx|notelist}}<br />{{tlx|notelist-la}} || a b c d e f g h i j
Line 347: Line 376:
|}<section end=pregrouptable />
|}<section end=pregrouptable />


* {{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.
* {{tlx|efn}} supports {{para|name}} and {{para|group}}, which work the same as the parameters in {{tag|ref|o}} (see, for instance, the 3rd and 4th examples below). Do not enclose values in quotes.
* {{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.
* {{tlx|notelist}} supports the {{para|colwidth}}, {{para|refs}}, and {{para|group}} parameters, which work the same as the parameters in {{tlx|reflist}}. Do not enclose values in quotes.


In these examples, the footnote labels match between the footnote marker and the reference list:
In these examples, the footnote labels match between the footnote marker and the reference list:
Line 379: Line 408:
{{notelist}}
{{notelist}}
}}
}}
Note: With named references you only need to add the details once. For each use after the first you just need to re-use the reference name. Doing this will not cause the inline superscript to display a custom name.


{{markup|title=Named references can also be defined in the notelist
{{markup|title=Named references can also be defined in the notelist
Line 394: Line 424:
}}
}}
}}
}}
'''Note''': Due to limitations in the MediaWiki software, do not use list defined footnotes that contain references.


===Issues===
===Issues===
* 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.
* 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 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}} does not exactly match one of the predefined values; use {{tlx|efn}} or variant as {{para|group}} will not be needed.
Line 423: Line 454:
{{main|Help:References and page numbers}}
{{main|Help:References and 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 [[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.
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.  


For example:
One common approach is to use [[Help:Shortened footnotes|shortened citations]]. The long citation to support the shortened citations can either be placed as a bullet point in a separate ''References section'' after the ''Footnotes section''; or it can be placed in the first footnote to cite the source (with the initial relevant page number[s]). The remaining footnotes will use shortened citations (these usually contain the author's last name, the date of publication, and the relevant page number[s]).
 
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. For example:


{{markup
{{markup
Line 455: Line 488:


== Flagging inadequate referencing ==
== Flagging inadequate referencing ==
{{See also | Template: Unreferenced/doc#Usage}}
{{See also | Template: Unreferenced/doc#Usage|Template:Citation style}}
* 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 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 template {{Tlx|Unreferenced}} should be added to articles with '''no references at all'''. For biographies of living persons, use {{tlx|BLP unsourced}} instead.
* The template {{Tlx|Unreferenced}} should be added to articles with '''no references at all'''. For biographies of living persons, use {{tlx|BLP unsourced}} instead.
Anonymous user