Wikipedia:Nesting footnotes: Difference between revisions
→(1) In same list: Uncentered the examples. See {{diff l1025672395 | label= previous edit }} Tags: Reverted Mobile edit Mobile web edit Advanced mobile edit |
|||
Line 199: | Line 199: | ||
A subnote may appear in the same list as the footnote in which it is nested, although the subnote will appear ''above'' the main note referring to it. |
A subnote may appear in the same list as the footnote in which it is nested, although the subnote will appear ''above'' the main note referring to it. |
||
<center> |
|||
{{markup|width=90% |
{{markup|width=90% |
||
|<nowiki>Mary<ref>Bloggs, 1981.</ref> had a little lamb.{{refn|group=lower-alpha|Mary's possessions are on record.{{refn|group=lower-alpha|They have been itemised by Book<ref>Book, 1949.</ref> and others.}} }} Its fleece was white as snow.<ref>Scroggs, 1983.</ref> |
|<nowiki>Mary<ref>Bloggs, 1981.</ref> had a little lamb.{{refn|group=lower-alpha|Mary's possessions are on record.{{refn|group=lower-alpha|They have been itemised by Book<ref>Book, 1949.</ref> and others.}} }} Its fleece was white as snow.<ref>Scroggs, 1983.</ref> |
||
Line 216: | Line 217: | ||
{{reflist}} |
{{reflist}} |
||
}} |
}} |
||
</center> |
|||
====(2) In separate list: non-numeric marker==== |
====(2) In separate list: non-numeric marker==== |
Revision as of 21:45, 28 May 2021
This help page is a how-to guide. It explains concepts or processes used by the Wikipedia community. It is not one of Wikipedia's policies or guidelines, and may reflect varying levels of consensus. |
This page in a nutshell: Footnotes placed within footnotes may appear in the same list as the containing footnotes, or in a separate list. There are various choices in layout and formatting. In some cases, markup using <ref></ref> tags will cause an error message. |
This page explains how to "nest" footnotes (references or notes) in Wikipedia articles, i.e. how to create a footnote within a footnote. It reflects the way the MediaWiki software operates as of July 2015.
Overview
Footnotes: reminder
Footnotes are used most commonly to provide:
- References to reliable sources, published in print or online
- Notes containing supplementary content.
The Footnotes system shows two elements on the page:
- A Footnote marker is displayed in the article's content as a bracketed, superscripted number, letter, or word. Examples shown respectively are: [1] [a] [Note 1]. This footnote label is linked to the full footnote.
- A Footnote displays the full note or reference. The footnotes are displayed in an ordered list wherever the reference list markup (e.g.
{{reflist}}
,{{reflist|group=...}}
or{{notelist}}
) is placed. Each entry begins with the footnote label in plain text.
Nesting footnotes
Sometimes, an editor wishes to insert (nest) a footnote within a footnote. We will call the inserted footnote a "subnote". Cases may include:
Type of nesting | Example |
---|---|
Reference within a note | Lorem ipsum dolor[1] sit amet.[a] Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.[3]
NotesReferences |
Note within a note | Lorem ipsum dolor[1] sit amet.[a] Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.[3]
NotesSubnotes References |
Note on a reference | Lorem ipsum dolor[1] sit amet. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.[2]
References
Notes on references
|
Things to consider
- Is your subnote really necessary? Especially if the subnote is a short one, would it be more straightforward for the reader - as well as for you - to keep it as part of the main note, perhaps in brackets?
- If the subnote is a reference, should it appear within the main numbered list of references, or in a separate list?
- If the subnote appears in a separate list, where should that list be placed among the different lists of footnotes?
- Should the subnote marker be - numeric [1], a roman numeral [i], alphabetic [a], or user-defined [subnote 1]? Could it be confusing to use the same system in different footnote lists? Bear in mind also that roman numeral [i] is identical with alphabetic [i].
What does not work
You cannot nest a footnote within a footnote that uses <ref>...</ref> tags, even if the footnotes belong to different groups.
1. Using <ref>...</ref> tags within <ref>...</ref> tags
Neither the subnote nor the preceding part of the main footnote is displayed. An error message is displayed in red font. The following part of the main footnote (if any) appears in the article text, with an unwanted </ref> tag.
Case 1: Error message and missing text, using nested <ref>...</ref> tags |
---|
Lorem ipsum dolor[1] sit amet.Cite error: A <ref> tag is missing the closing </ref> (see the help page).This is the latter part of the main footnote.</ref> Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.[2]
NotesReferences |
2. Using a {{refn}}
template within <ref>...</ref> tags
The subnote is not displayed. An error message is displayed in red font.
Case 2: Error message and missing text, using {{refn}} within <ref>...</ref> tags
|
---|
Lorem ipsum dolor[1] sit amet.[A] Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.[2]
Notes
"" (see the help page).References |
3. Using a {{efn}}
template within <ref>...</ref> tags
The subnote is not displayed. An error message is displayed in red font.
Case 3: Error message and missing text, using {{efn}} within <ref>...</ref> tags
|
---|
Lorem ipsum dolor[1] sit amet.[A] Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.[2]
Notes
"lower-alpha" (see the help page).SubnotesReferences |
4. List-defined references
Due to a long-standing bug (see phab:T22707), list-defined references do not work correctly when references are nested.
Case 4: Error message and missing reference using list-defined references |
---|
Lorem ipsum dolor[1] sit amet.[2]
References |
Use of templates for nesting footnotes
To nest a footnote within another, one or both footnotes should be enclosed within the {{refn}}
template or the {{efn}}
template. You may also use #tag:ref
– this is just a less user-friendly equivalent of {{refn}}
.
{{efn}}
is equivalent to {{refn|group=lower-alpha}}
, and the corresponding {{notelist}}
is equivalent to {{reflist|group=lower-alpha}}
. Likewise, {{efn-lr}}
is equivalent to {{refn|group=lower-roman}}
, and the corresponding {{notelist-lr}}
is equivalent to {{reflist|group=lower-roman}}
; similarly for the other variants.
The following are some examples of correct use of these templates for nesting footnotes. Other permutations are possible and will yield similar results.
Reference within note
The reference appears within the main list of numbered references, and the reference marker is a simple numeral.
Using {{refn}}
Markup | Renders as |
---|---|
Mary<ref>Bloggs, 1981.</ref> had a little lamb.{{refn|group=lower-alpha|Mary's possessions are on record.<ref>Book, 1949.</ref>}} Its fleece was white as snow.<ref>Scroggs, 1983.</ref> ====Notes==== {{reflist|group=lower-alpha}} ====References==== {{reflist}} |
|
Using {{efn}}
Markup | Renders as |
---|---|
Mary<ref>Bloggs, 1981.</ref> had a little lamb.{{efn|Mary's possessions are on record.<ref>Book, 1949.</ref> }} Its fleece was white as snow.<ref>Scroggs, 1983.</ref> ====Notes==== {{notelist}} ====References==== {{reflist}} |
|
Subnote within note
(1) In same list
A subnote may appear in the same list as the footnote in which it is nested, although the subnote will appear above the main note referring to it.
Markup | Renders as |
---|---|
Mary<ref>Bloggs, 1981.</ref> had a little lamb.{{refn|group=lower-alpha|Mary's possessions are on record.{{refn|group=lower-alpha|They have been itemised by Book<ref>Book, 1949.</ref> and others.}} }} Its fleece was white as snow.<ref>Scroggs, 1983.</ref> ====Notes==== {{reflist|group=lower-alpha}} ====References==== {{reflist}} |
|
(2) In separate list: non-numeric marker
The subnote appears in a separate list, above or below the list in which the main note appears. The subnote is given a non-numeric marker - e.g. [b] or [iv].
If the main note is also indexed in the same way, to keep the lists separate the two sets of markers must be different, e.g. one set alphabetic with the other set roman numerals. The full range of possible markers can be seen here.
Using {{refn}}
Note the use of {{refn}}
rather than <ref>...</ref> for both main note and subnote, so that the reference doubly nested within the subnote will display correctly.
Markup | Renders as |
---|---|
Mary<ref>Bloggs, 1981.</ref> had a little lamb.{{refn|group=lower-alpha|Mary's possessions are on record.{{refn|group=lower-roman|They have been itemised by Book<ref>Book, 1949.</ref> and others.}} }} Its fleece was white as snow.<ref>Scroggs, 1983.</ref> ====Notes==== {{reflist|group=lower-alpha}} ''Subnotes'' {{reflist|group=lower-roman}} ====References==== {{reflist}} |
|
Using {{efn}}
Note the use of {{efn}}
rather than <ref>...</ref> for both main note and subnote, so that the reference doubly nested within the subnote will display correctly.
Markup | Renders as |
---|---|
Mary<ref>Bloggs, 1981.</ref> had a little lamb.{{efn|Mary's possessions are on record.{{efn-lr|They have been itemised by Book<ref>Book, 1949.</ref> and others.}} }} Its fleece was white as snow.<ref>Scroggs, 1983.</ref> ====Notes==== {{notelist}} ''Subnotes'' {{notelist-lr}} ====References==== {{reflist}} |
|
(3) In separate list: numeric marker with character string
The subnote appears in a separate list, above or below the list in which the main note appears. The subnote is given a numeral preceded by a character string, e.g. [Subnote 3], [n 3] or [nb 3].
If the main note is also indexed in the same way, to keep the lists separate the two character strings must be different. The main note and subnote both use {{refn}}
.
Markup | Renders as |
---|---|
Mary<ref>Bloggs, 1981.</ref> had a little lamb.{{refn|group=main note|Mary's possessions are on record.{{refn|group=subnote|They have been itemised by Book<ref>Book, 1949.</ref> and others.}} }} Its fleece was white as snow.<ref>Scroggs, 1983.</ref> ====Main notes==== {{reflist|group=main note}} ''Subnotes'' {{reflist|group=subnote}} ====References==== {{reflist}} |
Mary[1] had a little lamb.[main note 1] Its fleece was white as snow.[3] Main notes
Subnotes References |
Subnote within reference
The subnote appears in a separate list, below the main References list. The subnote uses {{refn}}
with a predefined or user-defined group. Be aware that because nesting fails within <ref></ref> tags, the reference bearing the subnote also has to use {{refn}}
(without a group), not the more usual <ref></ref>.
(1) Non-numeric marker
Markup | Renders as |
---|---|
Mary<ref>Bloggs, 1981.</ref> had a little lamb.{{refn|Book, 1949.{{refn|group=lower-alpha|The relevant chapter does not appear in the paperback edition of 1955.}} }} Its fleece was white as snow.<ref>Scroggs, 1983.</ref> ====References==== {{reflist}} ''Notes on the references'' {{reflist|group=lower-alpha}} |
|
(2) Numeric marker with character string
Markup | Renders as |
---|---|
Mary<ref>Bloggs, 1981.</ref> had a little lamb.{{refn|Book, 1949.{{refn|group=Note|The relevant chapter does not appear in the paperback edition of 1955.}} }} Its fleece was white as snow.<ref>Scroggs, 1983.</ref> ====References==== {{reflist}} ''Notes on the references'' {{reflist|group=Note}} |
|
See also
- 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 nesting footnotes in articles if you were not able to find the information you need on this help page.