Help:Footnotes: Difference between revisions

Jump to navigation Jump to search
m
1 revision imported
m (1 revision imported)
m (1 revision imported)
 
(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|H:FN}}
{{Wikipedia how to|H:FOOT|WP:FOOTNOTES|H:FN}}


Line 127: 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 139: 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 210: Line 212:


==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 221: Line 222:


{{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 241: 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.


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 267: Line 271:
}}
}}


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 333: 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 353: Line 378:


* {{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|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 384: Line 409:
{{notelist}}
{{notelist}}
}}
}}
Note: With named references, there is no need to add again the whole information, but just the name of the reference that contains said information. It doesn't mean that the inline note will display a superscript with 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

Navigation menu