Help:Footnotes
Template:Pp-semi-indefTemplate:Short description Template:For Template:For Template:Redirect Template:Redirect 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:
- references (bibliographic citations) to reliable sources,
- explanatory information or
- source information for tables and other elements.
Footnotes or shortened footnotes 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 Template:Cite.php software extension. This extension adds the HTML-like elements {{#switch:pair
|c|close = |e|empty|s|single|v|void |o|open |p|pair = <{{#if:|ref|ref}}{{#if:| {{{attribs}}}}} }}{{#switch:pair |c|close = |e|empty|s|single|v|void = /> |o|open = > |p|pair = {{#ifeq:ref|!--||>}}... }}{{#switch:pair |e|empty|s|single|v|void |o|open = |c|close |p|pair = {{#ifeq:ref|!--|-->|</ref>}} }}
,{{#switch:s |c|close = |e|empty|s|single|v|void |o|open |p|pair = <{{#if:|references|references}}{{#if:| {{{attribs}}}}} }}{{#switch:s |c|close = |e|empty|s|single|v|void = /> |o|open = > |p|pair = {{#ifeq:references|!--||>}}... }}{{#switch:s |e|empty|s|single|v|void |o|open = |c|close |p|pair = {{#ifeq:references|!--|-->|</references>}} }}
and{{#switch:pair |c|close = |e|empty|s|single|v|void |o|open |p|pair = <{{#if:|references|references}}{{#if:| {{{attribs}}}}} }}{{#switch:pair |c|close = |e|empty|s|single|v|void = /> |o|open = > |p|pair = {{#ifeq:references|!--||>}}... }}{{#switch:pair |e|empty|s|single|v|void |o|open = |c|close |p|pair = {{#ifeq:references|!--|-->|</references>}} }}
. The elements are also used in a number of templates; for example, it is becoming more common to use {{reflist}} rather than{{#switch:s |c|close = |e|empty|s|single|v|void |o|open |p|pair = <{{#if:|references|references}}{{#if:| {{{attribs}}}}} }}{{#switch:s |c|close = |e|empty|s|single|v|void = /> |o|open = > |p|pair = {{#ifeq:references|!--||>}}... }}{{#switch:s |e|empty|s|single|v|void |o|open = |c|close |p|pair = {{#ifeq:references|!--|-->|</references>}} }}
as it can style the reference list.
Overview[edit source]
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: [{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}{{#if:|}}1{{#if:|}}{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}][{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}{{#if:|}}a{{#if:|}}{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}][{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}{{#if:|}}Note 1{{#if:|}}{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}]. 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 [{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}{{#if:|}}1{{#if:|}}{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}], the second would be [{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}{{#if:|}}2{{#if:|}}{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}] and so on. Custom labels are also incremented: [{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}{{#if:|}}a{{#if:|}}{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}][{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}{{#if:|}}b{{#if:|}}{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}][{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}{{#if:|}}c{{#if:|}}{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}], [{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}{{#if:|}}Note 1{{#if:|}}{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}] [{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}{{#if:|}}Note 2{{#if:|}}{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}] [{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}{{#if:|}}Note 3{{#if:|}}{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}].
- For a single use footnote, the label is followed by a caret (^) that is a backlink to the matching footnote marker. For example:
- If a named footnote is used in the text multiple times, then the footnote has multiple backlinks shown as letters:
- Clicking on the backlink or pressing Template:Keypress returns to the footnote marker.
Footnotes in action[edit source]
The superscript numeral "1" in square brackets at the end of this sentence is an example of a footnote marker.[1]
| {{#iferror: {{#ifexpr: 1 > 1 }} |column-width: {{{1}}};}} | {{#if: |column-width: {{{colwidth}}};}} }} {{#if:||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}>
- ↑ This is a footnote that contains a citation or note.
Footnotes: the basics[edit source]
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 {{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|ref|ref}}{{#if:| {{{attribs}}}}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:ref|!--||>}}...
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:ref|!--|-->|</ref>}}
}}
tags. For example:
{{#if: ||+ {{{title}}}}}
{{#if: |
Markup | Renders as
}}{{#if:This is page content.<ref>''LibreOffice For Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref> {{reflist}}| | ||
This is page content.<ref>''LibreOffice For Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref> {{reflist}} |
This is page content.[1] 1 }}||{{#switch:|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:|style="{{#if:
|
column-width: {{{1}}};}} | column-width: {{{colwidth}}};}}
}} {{#if:||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}>
}}{{#if:| |
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}} | |||
The {{reflist}} template will be explained in the next section.
The content inside the {{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|ref|ref}}{{#if:| {{{attribs}}}}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:ref|!--||>}}...
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq: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.
Where to place ref tags[edit source]
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:
{{#if: ||+ {{{title}}}}} {{#if: |Markup | Renders as
}}{{#if:...text.<ref>Content of the reference</ref> {{reflist}}| | ||
...text.<ref>Content of the reference</ref> {{reflist}} |
...text.[1] {{#ifeq:Help||Template:FormattingError|Right}} 1 }}||{{#switch:|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:|style="{{#if:
|
column-width: {{{1}}};}} | column-width: {{{colwidth}}};}}
}} {{#if:||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}>
}}{{#if:...text<ref>Content of the reference</ref>. {{reflist}}| |
...text<ref>Content of the reference</ref>. {{reflist}} |
...text[1]. {{#ifeq:Help||Template:FormattingError|Wrong (tag before punctuation)}} 1 }}||{{#switch:|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:|style="{{#if:
|
column-width: {{{1}}};}} | column-width: {{{colwidth}}};}}
}} {{#if:||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}>
}}{{#if:...text. <ref>Content of the reference</ref> {{reflist}}| |
...text. <ref>Content of the reference</ref> {{reflist}} |
...text. [1] {{#ifeq:Help||Template:FormattingError|Wrong (space before tag)}} 1 }}||{{#switch:|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:|style="{{#if:
|
column-width: {{{1}}};}} | column-width: {{{colwidth}}};}}
}} {{#if:||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}>
}}{{#if:| |
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}} | |||
Formatting ref tags[edit source]
The content of the ref tags can be formatted using most wiki markup or HTML markup, although techniques such as the pipe trick and template substitution will not work in footnotes. For example:
{{#if: ||+ {{{title}}}}} {{#if: |Markup | Renders as
}}{{#if:This is page content.<ref>''LibreOffice For Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref> {{reflist}}| | ||
This is page content.<ref>''LibreOffice For Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref> {{reflist}} |
This is page content.[1] 1 }}||{{#switch:|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:|style="{{#if:
|
column-width: {{{1}}};}} | column-width: {{{colwidth}}};}}
}} {{#if:||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}>
}}{{#if:| |
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}} | |||
The ref tag content may also contain an internal or external link:
{{#if: ||+ {{{title}}}}} {{#if: |Markup | Renders as
}}{{#if: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.<ref>''[http://www.example.org LibreOffice For Starters]'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref> {{reflist}} |
This is page content.[1] 1 }}||{{#switch:|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:|style="{{#if:
|
column-width: {{{1}}};}} | column-width: {{{colwidth}}};}}
}} {{#if:||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}>
}}{{#if:| |
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}} | |||
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:
Character | space | " | ' | < | > | [ | ] | { | | | } |
---|---|---|---|---|---|---|---|---|---|---|
Encoding | %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[edit source]
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.
{{#if: ||+ {{{title}}}}} {{#if: |Markup | Renders as
}}{{#if:This is page content.<ref>''LibreOffice For Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref> ==References== {{reflist}}| | |||||||||
This is page content.<ref>''LibreOffice For Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref> ==References== {{reflist}} |
{{{demospace}}} | main | other
}} }} |
main = Template:Error | other | #default = }} 1 }}||{{#switch:|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:|style="{{#if:
|
column-width: {{{1}}};}} | column-width: {{{colwidth}}};}}
}} {{#if:||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}>
}}{{#if:| | ||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}} | ||||||||||
Notes Template:Shortcut
- 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
|{{SAFESUBST:#if:close|close=}}
parameter; that bug has been fixed and the|{{SAFESUBST:#if:close|close=}}
parameter may safely be removed. - When editing,
{{#switch:s
|c|close = |e|empty|s|single|v|void |o|open |p|pair = <{{#if:|references|references}}{{#if:| {{{attribs}}}}} }}{{#switch:s |c|close = |e|empty|s|single|v|void = /> |o|open = > |p|pair = {{#ifeq:references|!--||>}}... }}{{#switch:s |e|empty|s|single|v|void |o|open = |c|close |p|pair = {{#ifeq:references|!--|-->|</references>}} }}
may be seen instead of {{reflist}}. This is valid, but{{#switch:s |c|close = |e|empty|s|single|v|void |o|open |p|pair = <{{#if:|references|references}}{{#if:| {{{attribs}}}}} }}{{#switch:s |c|close = |e|empty|s|single|v|void = /> |o|open = > |p|pair = {{#ifeq:references|!--||>}}... }}{{#switch:s |e|empty|s|single|v|void |o|open = |c|close |p|pair = {{#ifeq:references|!--|-->|</references>}} }}
does not offer the advanced features of {{reflist}}.
Footnotes: using a source more than once[edit source]
Template:Shortcut Template:See also You can cite the same source more than once on a page by using named footnotes. The syntax to define a named footnote is:
{{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|ref|ref}}{{#if:name="name"| name="name"}}
}}{{#switch:pair
|c|close = content
|e|empty|s|single|v|void = />
|o|open = >content
|p|pair = {{#ifeq:ref|!--||>}}content
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:ref|!--|-->|</ref>}}
}}
To invoke the named footnote:
{{#switch:s
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|ref|ref}}{{#if:name="name"| name="name"}}
}}{{#switch:s
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:ref|!--||>}}...
}}{{#switch:s
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:ref|!--|-->|</ref>}}
}}
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
":31337"
(which is punctuation plus a number), but it will ignore"31337"
(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":31337"
. - Names must be unique. You may not use the same name to define different groups or footnotes. Try to avoid picking a name that someone else is likely to choose for a new citation, such as
":0"
or"NYT"
. - Please consider keeping reference names simple and restricted to the standard English alphabet and numerals. If spaces are used, the following technical restrictions become relevant:
- Quotation marks are preferred but optional if the only characters used are letters
A–Z
,a–z
, digits0–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<
and"
, respectively.{{#if: |
- Quotation marks are preferred but optional if the only characters used are letters
{{{2}}}}}
- 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
}}{{#if: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}}| | ||
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}} |
column-width: {{{1}}};}} | column-width: {{{colwidth}}};}}
}} {{#if:||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}> }}{{#if:| | |
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}} | |||
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:
{{#if: ||+ {{{title}}}}} {{#if: |Markup | Renders as
}}{{#if: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}}| | ||
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}} |
column-width: {{{1}}};}} | column-width: {{{colwidth}}};}}
}} {{#if:||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}> }}{{#if:| | |
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}}{{#if:| | |||
}} | |||
When using both names and groups, the syntax is:
{{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|ref|ref}}{{#if:group="groupname" name="name"| group="groupname" name="name"}}
}}{{#switch:pair
|c|close = Content
|e|empty|s|single|v|void = />
|o|open = >Content
|p|pair = {{#ifeq:ref|!--||>}}Content
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:ref|!--|-->|</ref>}}
}}
Care should be taken when deleting references to avoid creating a cite error. See Avoiding common mistakes.
Reference lists: columns[edit source]
When using {{reflist}}, the list can be split into columns.
- {{#if:||
}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:reflist|reflist]]{{#if:xxem||xxem}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} 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:
- {{#if:||
}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Reflist|Reflist]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} - 1 column (default): Where there are only a few Template:Fnote; see Template:Oldid - {{#if:||
}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Reflist|Reflist]]{{#if:30em||30em}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}}: Where there are many footnotes plus a page-width Bibliography subsection: see Template:Oldid - {{#if:||
}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Reflist|Reflist]]{{#if:20em||20em}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}}: Where {{#ifeq:{{{lc}}}||shortened footnotes|Shortened footnotes}} are used; see Template:Oldid.
For example:
Using {{#if:||}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Reflist|Reflist]]{{#if:30em||30em}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} will create columns with a minimum width of 30 em,
Markup | Renders as
}}{{#if: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.<ref>Source name, access date, etc.</ref> Lorem ipsum dolor sit amet.<ref>Source name, access date, etc.</ref> ==References== {{Reflist|30em}} |
{{{demospace}}} | main | other
}} }} |
main = Template:Error | other | #default = }} 1 }}||{{#switch:30em|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:30em|style="{{#if: 30em
|
column-width: 30em;}} | column-width: {{{colwidth}}};}}
}} {{#if:||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}> }}{{#if:| | ||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}} | ||||||||||
List-defined references[edit source]
Template:Shortcut Template:Main 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:
<syntaxhighlight lang="xml">
| {{#iferror: {{#ifexpr: 1 > 1 }} |column-width: {{{1}}};}} | {{#if: |column-width: {{{colwidth}}};}} }} {{#if:||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}>
Cite error: <ref>
tag defined in <references>
has group attribute "" which does not appear in prior text.
Cite error: <ref>
tag defined in <references>
has group attribute "" which does not appear in prior text.
<ref>
tag defined in <references>
has group attribute "" which does not appear in prior text.</syntaxhighlight>
or, alternatively,
<syntaxhighlight lang="xml">
Cite error: <ref>
tag defined in <references>
has group attribute "" which does not appear in prior text.
Cite error: <ref>
tag defined in <references>
has group attribute "" which does not appear in prior text.
Cite error: <ref>
tag defined in <references>
has group attribute "" which does not appear in prior text.
</syntaxhighlight>
The footnote markers are included as usual for a named footnote. For example:
{{#if: ||+ {{{title}}}}} {{#if: |Markup | Renders as
}}{{#if: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.<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> }} |
{{{demospace}}} | main | other
}} }} |
main = Template:Error | other | #default = }} 1 }}||{{#switch:|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:|style="{{#if:
|
column-width: {{{1}}};}} | column-width: {{{colwidth}}};}}
}} {{#if:||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}> }}{{#if:| | ||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}} | ||||||||||
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[edit source]
Explanatory notes may need to be referenced. Because of limitations in the Template:Cite.php software, reference tags cannot be nested; that is, a set of {{#switch:pair
|c|close = |e|empty|s|single|v|void |o|open |p|pair = <{{#if:|ref|ref}}{{#if:| {{{attribs}}}}} }}{{#switch:pair |c|close = |e|empty|s|single|v|void = /> |o|open = > |p|pair = {{#ifeq:ref|!--||>}}... }}{{#switch:pair |e|empty|s|single|v|void |o|open = |c|close |p|pair = {{#ifeq:ref|!--|-->|</ref>}} }}
tags cannot be placed inside another pair of{{#switch:pair |c|close = |e|empty|s|single|v|void |o|open |p|pair = <{{#if:|ref|ref}}{{#if:| {{{attribs}}}}} }}{{#switch:pair |c|close = |e|empty|s|single|v|void = /> |o|open = > |p|pair = {{#ifeq:ref|!--||>}}... }}{{#switch:pair |e|empty|s|single|v|void |o|open = |c|close |p|pair = {{#ifeq:ref|!--|-->|</ref>}} }}
tags. Attempting to do so will result in a cite error.
The templates {{r}} and {{refn}} can be used to nest references. The markup is:
- {{#if:||
}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:refn|refn]]{{#if:group=group||group=group}}{{#if:name=name||name=name}}{{#if:content||content}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} or - {{#if:||
}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:r|r]]{{#if:group=group||group=group}}{{#if:name=name||name=name}}{{#if:refn=content||refn=content}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} or - {{#if:||
}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:r|r]]{{#if:g=group||g=group}}{{#if:n=name||n=name}}{{#if:r=content||r=content}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} (shorter)
name and group being optional parameters. The content may include {{#switch:o
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|ref|ref}}{{#if:| {{{attribs}}}}}
}}{{#switch:o
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:ref|!--||>}}...
}}{{#switch:o
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:ref|!--|-->|</ref>}}
}}
tags or another {{r}} template.
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.
Examples:
Using {{refn}}[edit source]
{{#if: ||+ {{{title}}}}} {{#if: |Markup | Renders as
}}{{#if: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.{{refn|group=nb|A footnote.<ref>A reference for the footnote.</ref>}} ==Notes== {{reflist|group=nb}} ==References== {{reflist}} |
{{{demospace}}} | main | other
}} }} |
main = Template:Error | other | #default = }} 1 }}||{{#switch:|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:|style="{{#if:
|
column-width: {{{1}}};}} | column-width: {{{colwidth}}};}}
}} {{#if:nb||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}> {{#switch: {{#if: |
{{{demospace}}} | main | other
}} }} |
main = Template:Error | other | #default = }} 1 }}||{{#switch:|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:|style="{{#if:
|
column-width: {{{1}}};}} | column-width: {{{colwidth}}};}}
}} {{#if:||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}>
}}{{#if:| | |||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}} | |||||||||||||||||||
Using {{r}}[edit source]
{{#if: ||+ {{{title}}}}} {{#if: |Markup | Renders as
}}{{#if: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}} | | ||||||||||||||||||
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}} |
The quick brown fox jumps over the lazy dog.{{#if:|DEBUG: 1="", 2="nb", (name=""), (group=")", direction="", pages="", page="", location="", quote-pages="", quote-page="", quote-location="", quote="", language="", translation="", quote-cite="", reference="A footnote.{{#if:|DEBUG: 1="", 2="", (name=""), (group=")", direction="", pages="", page="", location="", quote-pages="", quote-page="", quote-location="", quote="", language="", translation="", quote-cite="", reference="A reference for the footnote.", annotation="", leadin="", postscript="", section="", needed-reason="", needed-date="", wrap="", no-pp="", style="", content-id="", link-id="", debug="". Potential context-section-name:"cite_sect-Template:Trim_quotes-Template:Trim_quotes-Template:Trim_quotesTemplate:Trim_quotes".}}{{#if:|{{#if:|Page Template:Tooltip/styles.css has no content.<span class="rt-commentedText tooltip tooltip-dotted" title="Context: "Script error: No such module "DecodeEncode"."">}}}}{{#if:|}}{{#if:|Cite error: Invalid {{#switch: {{#if: |
{{{demospace}}} | main | other
}} }} |
main = Template:Error | other | #default = }} 1 }}||{{#switch:|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:|style="{{#if:
|
column-width: {{{1}}};}} | column-width: {{{colwidth}}};}}
}} {{#if:nb||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}>
{{#switch: {{#if: |
{{{demospace}}} | main | other
}} }} |
main = Template:Error | other | #default = }} 1 }}||{{#switch:|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:|style="{{#if:
|
column-width: {{{1}}};}} | column-width: {{{colwidth}}};}}
}} {{#if:||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}>
}}{{#if:| | ||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}} | |||||||||||||||||||
The use of the magic word #tag:ref
is valid, but the sequence of parameters is invariant and nonintuitive. {{r}} as well as {{refn}} and its variants use this markup internally.
{{#tag:ref|refcontent|group=groupname|name=name}}
Footnotes: groups[edit source]
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:
{{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|ref|ref}}{{#if:group=groupname| group=groupname}}
}}{{#switch:pair
|c|close = Content
|e|empty|s|single|v|void = />
|o|open = >Content
|p|pair = {{#ifeq:ref|!--||>}}Content
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:ref|!--|-->|</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:
- {{#if:||
}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:reflist|reflist]]{{#if:group=groupname||group=groupname}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}}
The reference list group name does not need to be enclosed in quotes.
Example:
{{#if: ||+ {{{title}}}}} {{#if: |Markup | Renders as
}}{{#if: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,<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}} |
{{{demospace}}} | main | other
}} }} |
main = Template:Error | other | #default = }} 1 }}||{{#switch:|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:|style="{{#if:
|
column-width: {{{1}}};}} | column-width: {{{colwidth}}};}}
}} {{#if:note||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}> {{#switch: {{#if: |
{{{demospace}}} | main | other
}} }} |
main = Template:Error | other | #default = }} 1 }}||{{#switch:|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:|style="{{#if:
|
column-width: {{{1}}};}} | column-width: {{{colwidth}}};}}
}} {{#if:||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}>
}}{{#if:| | |||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}}{{#if:| | |||||||||||||||||||
}} | |||||||||||||||||||
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:
{{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|ref|ref}}{{#if:group="groupname" name="name"| group="groupname" name="name"}}
}}{{#switch:pair
|c|close = Content
|e|empty|s|single|v|void = />
|o|open = >Content
|p|pair = {{#ifeq:ref|!--||>}}Content
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:ref|!--|-->|</ref>}}
}}
For the repeated note:
{{#switch:s
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|ref|ref}}{{#if:group="groupname" name="name"| group="groupname" name="name"}}
}}{{#switch:s
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:ref|!--||>}}...
}}{{#switch:s
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:ref|!--|-->|</ref>}}
}}
Footnotes: predefined groups[edit source]
Template:Shortcut Template:For Template:For Template:See also There are several predefined groups that can have a reference list styled so that the label (a superscripted character within square brackets, e.g., [{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}{{#if:|}}1{{#if:|}}{{#ifeq:{{safesubst:#switch:
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}|yes|}}]) 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[edit source]
Group type | Footnote marker template or markup |
Reference list template |
Sample labels | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
none by default, but optionally any | {{#switch:pair
|
close = | empty|s|single|v|void | open | pair = <{{#if:|ref|ref}}{{#if:| {{{attribs}}}}}
}}{{#switch:pair |
close = | empty|s|single|v|void = /> | open = > | pair = {{#ifeq:ref|!-- | >}}...
}}{{#switch:pair |
empty|s|single|v|void | open = | close | pair = {{#ifeq:ref|!--|-->|</ref>}}
}} |
{{#if: | }}{{[[{{#if:|{{{SISTER}}}Template|Template}}:reflist|reflist]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if: |
}} | 1 2 3 4 5 6 7 8 9 10 |
{{#if: | }}{{[[{{#if:|{{{SISTER}}}Template|Template}}:r|r]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if: |
}} (for nested references) | ||||||||||||||||
{{#if: | }}{{[[{{#if:|{{{SISTER}}}Template|Template}}:refn|refn]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if: |
}} (for nested references) | ||||||||||||||||
lower-alpha | {{#if: | }}{{[[{{#if:|{{{SISTER}}}Template|Template}}:efn|efn]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if: |
}} {{#if: |
}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:efn-la|efn-la]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if: |
}} | {{#if: | }}{{[[{{#if:|{{{SISTER}}}Template|Template}}:notelist|notelist]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if: |
}} {{#if: |
}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:notelist-la|notelist-la]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if: |
}} | a b c d e f g h i j | |||||||
upper-alpha | {{#if: | }}{{[[{{#if:|{{{SISTER}}}Template|Template}}:efn-ua|efn-ua]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if: |
}} | {{#if: | }}{{[[{{#if:|{{{SISTER}}}Template|Template}}:notelist-ua|notelist-ua]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if: |
}} | A B C D E F G H I J | |||||||||||
lower-roman | {{#if: | }}{{[[{{#if:|{{{SISTER}}}Template|Template}}:efn-lr|efn-lr]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if: |
}} | {{#if: | }}{{[[{{#if:|{{{SISTER}}}Template|Template}}:notelist-lr|notelist-lr]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if: |
}} | i ii iii iv v vi vii viii ix x | |||||||||||
upper-roman | {{#if: | }}{{[[{{#if:|{{{SISTER}}}Template|Template}}:efn-ur|efn-ur]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if: |
}} | {{#if: | }}{{[[{{#if:|{{{SISTER}}}Template|Template}}:notelist-ur|notelist-ur]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if: |
}} | I II III IV V VI VII VIII IX X | |||||||||||
lower-greek | {{#if: | }}{{[[{{#if:|{{{SISTER}}}Template|Template}}:efn-lg|efn-lg]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if: |
}} | {{#if: | }}{{[[{{#if:|{{{SISTER}}}Template|Template}}:notelist-lg|notelist-lg]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if: |
}} | α β γ δ ε ζ η θ ι κ | |||||||||||
note | {{#if: | }}{{[[{{#if:|{{{SISTER}}}Template|Template}}:NoteTag|NoteTag]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if: |
}} | {{#if: | }}{{[[{{#if:|{{{SISTER}}}Template|Template}}:NoteFoot|NoteFoot]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if: |
}} | note 1 note 2 note 3 |
- {{#if:||
}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:efn|efn]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} supports|{{SAFESUBST:#if:name|name=}}
and|{{SAFESUBST:#if:group|group=}}
, which work the same as the parameters in{{#switch:o
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|ref|ref}}{{#if:| {{{attribs}}}}}
}}{{#switch:o
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:ref|!--||>}}...
}}{{#switch:o
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:ref|!--|-->|</ref>}}
}}
(see, for instance, the 3rd and 4th examples below). Do not enclose values in quotes.
- {{#if:||
}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:notelist|notelist]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} supports the|{{SAFESUBST:#if:colwidth|colwidth=}}
,|{{SAFESUBST:#if:refs|refs=}}
, and|{{SAFESUBST:#if:group|group=}}
parameters, which work the same as the parameters in {{#if:||}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:reflist|reflist]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}}. Do not enclose values in quotes.
In these examples, the footnote labels match between the footnote marker and the reference list:
{{#if:With lower-alpha labels ||+ With lower-alpha labels}} {{#if: |Markup | Renders as
}}{{#if: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.{{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.{{#if: |
[{{#switch: | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = | #default = lower-alpha }} 1] | [{{#switch:
| note
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman =
| #default = lower-alpha
}} 2]
}} Consectetur adipisicing elit.{{#if: |
[{{#switch: | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = | #default = lower-alpha }} 3] | [{{#switch:
| note
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman =
| #default = lower-alpha
}} 4]
}} Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.{{#if: |
[{{#switch: | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = | #default = lower-alpha }} 5] | [{{#switch:
| note
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman =
| #default = lower-alpha
}} 6]
}} 1 }}||{{#switch:|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:|style="{{#if:
|
column-width: ;}} | column-width: {{{colwidth}}};}}
}} {{#if:{{#switch: |
note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = | #default = lower-alpha
}}||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}> }}{{#if:| |
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}} | ||||||||||||||||
Markup | Renders as
}}{{#if: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.{{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.{{#if: |
[{{#switch: lower-roman | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = lower-roman | #default = lower-alpha }} 1] | [{{#switch: lower-roman
| note
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman = lower-roman
| #default = lower-alpha
}} 2]
}} Consectetur adipisicing elit.{{#if: |
[{{#switch: lower-roman | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = lower-roman | #default = lower-alpha }} 3] | [{{#switch: lower-roman
| note
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman = lower-roman
| #default = lower-alpha
}} 4]
}} Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.{{#if: |
[{{#switch: lower-roman | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = lower-roman | #default = lower-alpha }} 5] | [{{#switch: lower-roman
| note
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman = lower-roman
| #default = lower-alpha
}} 6]
}} 1 }}||{{#switch:|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:|style="{{#if:
|
column-width: ;}} | column-width: {{{colwidth}}};}}
}} {{#if:{{#switch: lower-roman |
note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = lower-roman | #default = lower-alpha
}}||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}> }}{{#if:| |
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}} | ||||||||||||||||
Markup | Renders as
}}{{#if: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.{{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.{{#if:fn1 |
[{{#switch: | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = | #default = lower-alpha }} 1] | [{{#switch:
| note
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman =
| #default = lower-alpha
}} 2]
}} Consectetur adipisicing elit.{{#if: |
[{{#switch: | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = | #default = lower-alpha }} 3] | [{{#switch:
| note
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman =
| #default = lower-alpha
}} 4]
}} Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.{{#if:fn1 |
[{{#switch: | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = | #default = lower-alpha }} 1] | Cite error: Invalid <ref> tag; refs with no name must have content
}} 1 }}||{{#switch:|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:|style="{{#if:
|
column-width: ;}} | column-width: {{{colwidth}}};}}
}} {{#if:{{#switch: |
note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = | #default = lower-alpha
}}||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}> }}{{#if:| |
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}} | ||||||||||||||||
Markup | Renders as
}}{{#if: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.{{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.{{#if:fn1 |
[{{#switch: | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = | #default = lower-alpha }} 1] | Cite error: Invalid <ref> tag; refs with no name must have content
}} Consectetur adipisicing elit.{{#if:fn2 |
[{{#switch: | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = | #default = lower-alpha }} 2] | Cite error: Invalid <ref> tag; refs with no name must have content
}} Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.{{#if:fn1 |
[{{#switch: | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = | #default = lower-alpha }} 1] | Cite error: Invalid <ref> tag; refs with no name must have content
}} 1 }}||{{#switch:|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:|style="{{#if:
|
column-width: ;}} | column-width: {{{colwidth}}};}}
}} {{#if:{{#switch: |
note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = | #default = lower-alpha
}}||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}> Cite error: <ref> tag defined in <references> has no name attribute.
}}{{#if:| |
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}}{{#if:| | ||||||||||||||||
}} | ||||||||||||||||
Issues[edit source]
- Multiple backlink labels (see WP:REFNAME) are always styled as lower-alpha. This can be confusing when {{#if:||
}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:efn|efn]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} 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
|{{SAFESUBST:#if:group|group=}}
in {{#if:||}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:reflist|reflist]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} or{{#switch:s
- The value for
|c|close = |e|empty|s|single|v|void |o|open |p|pair = <{{#if:|references|references}}{{#if:| {{{attribs}}}}} }}{{#switch:s |c|close = |e|empty|s|single|v|void = /> |o|open = > |p|pair = {{#ifeq:references|!--||>}}... }}{{#switch:s |e|empty|s|single|v|void |o|open = |c|close |p|pair = {{#ifeq:references|!--|-->|</references>}} }}
does not exactly match one of the predefined values; use {{#if:||}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:efn|efn]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} or variant as|{{SAFESUBST:#if:group|group=}}
will not be needed.
- The value for
|{{SAFESUBST:#if:group|group=}}
in {{#if:||}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:reflist|reflist]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} or{{#switch:s
- The value for
|c|close = |e|empty|s|single|v|void |o|open |p|pair = <{{#if:|references|references}}{{#if:| {{{attribs}}}}} }}{{#switch:s |c|close = |e|empty|s|single|v|void = /> |o|open = > |p|pair = {{#ifeq:references|!--||>}}... }}{{#switch:s |e|empty|s|single|v|void |o|open = |c|close |p|pair = {{#ifeq:references|!--|-->|</references>}} }}
is enclosed by quotes; use {{#if:||}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:efn|efn]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} or variant as|{{SAFESUBST:#if:group|group=}}
will not be needed.
- {{#if:||
}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:reflist|reflist]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} is indented with the <syntaxhighlight lang="text" class="" id="" style="" inline="1">:</syntaxhighlight> markup. {{#switch:s
- {{#if:||
|c|close = |e|empty|s|single|v|void |o|open |p|pair = <{{#if:|references|references}}{{#if:| {{{attribs}}}}} }}{{#switch:s |c|close = |e|empty|s|single|v|void = /> |o|open = > |p|pair = {{#ifeq:references|!--||>}}... }}{{#switch:s |e|empty|s|single|v|void |o|open = |c|close |p|pair = {{#ifeq:references|!--|-->|</references>}} }}
is used instead of {{#if:||}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:reflist|reflist]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}}
- The entries in the reference list will have no styling if:
- A reference is included in {{#if:||
}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:navbox|navbox]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} or one of the variants and the style is set tobodyclass=hlist
; to resolve this, replace the style withlistclass=hlist
.
- A reference is included in {{#if:||
- If the note text contains an "=" sign, precede the note text with
|{{SAFESUBST:#if:1|1=}}
, like this:{{efn|name=fn1|1=Very long footnote with an equation, 2+2=4}}
Reference lists: automatically generated[edit source]
Template:Main
A page with {{#switch:o
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|ref|ref}}{{#if:| {{{attribs}}}}}
}}{{#switch:o
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:ref|!--||>}}...
}}{{#switch:o
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:ref|!--|-->|</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[edit source]
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. 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 {{#if:||}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:rp|rp]]{{#if:8||8}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} right after the footnote marker and replace the "8" with the appropriate page number. For example:
Markup | Renders as
}}{{#if: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.<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 {{#switch: {{#if: |
{{{demospace}}} | main | other
}} }} |
main = Template:Error | other | #default = }} 1 }}||{{#switch:|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" {{#if:|style="{{#if:
|
column-width: {{{1}}};}} | column-width: {{{colwidth}}};}}
}} {{#if:||{{#if:|list-style-type: {{{liststyle}}};}}}}"}}>
}}{{#if:| | |
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}}{{#if:| | ||||||||||
}} | ||||||||||
{{#if:||}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:r|r]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} 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[edit source]
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[edit 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. Template:Clear
Issues and limitations[edit source]
- Template:Cite.php
- subst: does not work within
{{#switch:o
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|ref|ref}}{{#if:| {{{attribs}}}}}
}}{{#switch:o
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:ref|!--||>}}...
}}{{#switch:o
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:ref|!--|-->|</ref>}}
}}
tags. Template:Phab
- The pipe trick does not work within
{{#switch:o
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|ref|ref}}{{#if:| {{{attribs}}}}}
}}{{#switch:o
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:ref|!--||>}}...
}}{{#switch:o
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:ref|!--|-->|</ref>}}
}}
tags. Template:Phab
Flagging inadequate referencing[edit source]
- The template {{#if:||
}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Refimprove|Refimprove]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} 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 {{#if:||}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:BLP sources|BLP sources]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} instead. - The template {{#if:||
}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Unreferenced|Unreferenced]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} should be added to articles with no references at all. For biographies of living persons, use {{#if:||}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:BLP unsourced|BLP unsourced]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} instead. - The template {{#if:||
}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Unreferenced section|Unreferenced section]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} is for individual sections that have no citations in articles that have at least one citation somewhere else. For biographies of living persons, use {{#if:||}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:BLP unsourced section|BLP unsourced section]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} instead. - The template {{#if:||
}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Medref|Medref]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}{{#if:||
}} is specifically for articles needing additional medical references.
See also[edit source]
- Template:Harvard citation#Using CITEREF directly and {{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—{{Editor tools}}