Help:Footnotes: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
m (1 revision imported)
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.


===Where to place ref tags===
{{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:
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:
}}
}}


===Formatting ref tags===
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:
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 124: Line 129:


{{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 139:
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 147:
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==
Line 236: Line 241:
[[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.


Examples:
Example:


===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 271:
}}
}}


===Using {{tl|r}}===
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.
{{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 330:
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 328: Line 356:
! 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 377:
|}<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: