Différences entre versions de « Help/References »
Ligne 6 : | Ligne 6 : | ||
If you forget to include <code><nowiki><references /></nowiki></code> in the article, the footnotes will not disappear, but the references will be displayed at the end of the page. | If you forget to include <code><nowiki><references /></nowiki></code> in the article, the footnotes will not disappear, but the references will be displayed at the end of the page. | ||
− | {| class="wikitable" | + | {| class="wikitable" style="text-align:left;" |
! width="50%" | Wikitext | ! width="50%" | Wikitext | ||
! Rendering | ! Rendering | ||
Ligne 23 : | Ligne 23 : | ||
|} | |} | ||
+ | '''The <nowiki><references /></nowiki> tag'''<br> | ||
+ | The <code><nowiki><references /></nowiki></code> tag inserts the text of all the citations which have defined in <code><nowiki><ref></nowiki></code> tags up to that point in the page. | ||
+ | If a page includes more than one <code><nowiki><references /></nowiki></code> list, each list includes the <code><nowiki><ref></nowiki></code> tags defined after the previous references list. | ||
+ | '''Separating references from text'''<br> | ||
+ | In-text references make it easy to copy the text to another page; on the other hand, they make it hard to read. References containing a lot of data, quotes or elaborate citation templates can make up a significantly larger fraction of the source than the text that will actually be visible. To avoid this, recent versions of the extension allow moving some or all of the references into the <code><nowiki><references /></nowiki></code> section, to the place where they will actually appear to the reader. | ||
+ | {| class="wikitable" style="text-align:left;" | ||
+ | ! width="50%" | Wikitext | ||
+ | ! Rendering | ||
+ | |- | ||
+ | |<pre> | ||
+ | According to scientists, the Sun is pretty big.<ref name="miller" /> The Moon, however, is not so big.<ref name="smith" /> | ||
+ | '''Notes''' | ||
+ | <references> | ||
+ | <ref name="miller">E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23–25.</ref> | ||
+ | <ref name="smith">R. Smith, "Size of the Moon", ''Scientific American'', 46 (April 1978): 44–46.</ref> | ||
+ | </references> | ||
+ | </pre> | ||
+ | | | ||
+ | According to scientists, the Sun is pretty big.<ref name="miller" /> The Moon, however, is not so big.<ref name="smith" /> | ||
+ | '''Notes''' | ||
+ | <references> | ||
+ | <ref name="miller">E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23–25.</ref> | ||
+ | <ref name="smith">R. Smith, "Size of the Moon", ''Scientific American'', 46 (April 1978): 44–46.</ref> | ||
+ | </references> | ||
+ | |} | ||
+ | Thus, the code above will have the same output as the first example above, although the numbering and order of the references will not in general be the same. | ||
+ | ====Broken references==== | ||
+ | If the <code><nowiki><ref></nowiki></code> or <code><nowiki><references /></nowiki></code> tags are used incorrectly, the Cite extension will add an error message to the page, and will add the "Pages with reference errors" category. These error messages will appear in the user interface language, either in the article content or in the References section. | ||
+ | ====See also==== | ||
+ | [[Help/Citations|Citations]] | ||
Version du 26 octobre 2020 à 11:09
You can create references as footnotes on a page with the <ref>
tag.
The basic concept of the <ref>
tag is that it inserts the text enclosed by the ref tags as a footnote in a designated section, which you indicate with the placeholder tag <references />
.
Additional placeholder tags <references />
can be inserted in the text, and all <ref>
tags up to that point, in that group, will be inserted there.
If you forget to include <references />
in the article, the footnotes will not disappear, but the references will be displayed at the end of the page.
Wikitext | Rendering |
---|---|
The Sun is pretty big.<ref>E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23–25.</ref> The Moon, however, is not so big.<ref>R. Smith, "Size of the Moon", ''Scientific American'', 46 (April 1978): 44–46.</ref> '''Notes''' <references /> |
The Sun is pretty big.[1] The Moon, however, is not so big.[2] Notes
|
The <references /> tag
The <references />
tag inserts the text of all the citations which have defined in <ref>
tags up to that point in the page.
If a page includes more than one <references />
list, each list includes the <ref>
tags defined after the previous references list.
Separating references from text
In-text references make it easy to copy the text to another page; on the other hand, they make it hard to read. References containing a lot of data, quotes or elaborate citation templates can make up a significantly larger fraction of the source than the text that will actually be visible. To avoid this, recent versions of the extension allow moving some or all of the references into the <references />
section, to the place where they will actually appear to the reader.
Wikitext | Rendering |
---|---|
According to scientists, the Sun is pretty big.<ref name="miller" /> The Moon, however, is not so big.<ref name="smith" /> '''Notes''' <references> <ref name="miller">E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23–25.</ref> <ref name="smith">R. Smith, "Size of the Moon", ''Scientific American'', 46 (April 1978): 44–46.</ref> </references> |
According to scientists, the Sun is pretty big.[1] The Moon, however, is not so big.[2] Notes |
Thus, the code above will have the same output as the first example above, although the numbering and order of the references will not in general be the same.
Broken references
If the <ref>
or <references />
tags are used incorrectly, the Cite extension will add an error message to the page, and will add the "Pages with reference errors" category. These error messages will appear in the user interface language, either in the article content or in the References section.