Difference between revisions of "References - Mediawiki"
Line 1: | Line 1: | ||
− | + | __NOTOC__ | |
+ | This page explains very briefly how to create numbered footnotes and references using the '''<nowiki><ref> ... </ref></nowiki>''' and '''<nowiki><references/></nowiki>''' syntax, which is the current best-practice method in most circumstances. See [http://en.wikipedia.org/wiki/Wikipedia:Footnotes Wikipedia:Footnotes] for more detail. | ||
− | + | <b> | |
+ | Important: | ||
+ | </b> | ||
+ | A MediaWiki site (such as Wikipedia) must have the extension | ||
+ | [http://www.mediawiki.org/wiki/Extension:Cite/Cite.php Cite/Cite.php] | ||
+ | implemented to have the | ||
+ | <nowiki><ref></nowiki> | ||
+ | and | ||
+ | <nowiki><references/></nowiki> | ||
+ | tags rendered. | ||
+ | Extensions like | ||
+ | [http://www.mediawiki.org/wiki/Extension:Cite/Cite.php Cite/Cite.php] | ||
+ | are installed after installing MediaWiki. | ||
− | + | ===Single citation of a reference or footnote=== | |
− | + | At the point of citation in the main text, enter the reference or footnote like this: | |
− | + | :'''<nowiki><ref>Excel For Dummies, First Edition, Hungry Minds, Inc., 1980.</ref></nowiki>''' | |
− | + | You can include formatting and links in the footnote or reference text in the usual way. | |
− | + | When you want to note that a reference is needed, use the '''{{[[Template:fact|fact]]}}''' template instead. | |
− | === | + | ===Multiple citations of the same reference or footnote=== |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | To cite the same reference or footnote several times, identify it using the '''name''' [[parameter]] of the '''<nowiki><ref></nowiki>''' tag. | |
− | + | At ''one'' of the citation points (it makes sense to choose the first), enter the reference like this: | |
− | + | ||
− | + | ||
− | + | :'''<nowiki><ref name="Perry">Perry's Handbook, Sixth Edition, McGraw-Hill Co., 1984.</ref></nowiki>''' | |
− | < | + | |
− | = | + | |
− | + | ||
− | + | Then, at all the other citation points just enter: | |
− | = | + | :'''<nowiki><ref name="Perry"/></nowiki>''' |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | </ | + | |
− | ==== | + | ===Producing the reference or footnote list=== |
− | + | ||
− | + | ||
− | + | ||
− | + | At the point where you want the text of the footnotes or references to appear (usually at the end of the article in a "Notes" or "References" section), insert the tag: | |
− | + | :'''<nowiki><references/></nowiki>''' | |
− | + | ===What it looks like === | |
− | + | The '''<nowiki><ref></nowiki>''' tags in the main text are converted to auto-numbered superscripts, and '''{{[[Template:fact|fact]]}}''' is expanded to "citation needed", like this: | |
− | {{ | + | |
− | { | + | {|class=wikitable |
− | + | | | |
− | + | :The only reference to Excel For Dummies.<ref>Excel For Dummies, First Edition, Hungry Minds, Inc., 1980.</ref> | |
− | + | ||
− | </ | + | |
+ | :The first reference to Perry's Handbook.<ref name="Perry">Perry's Handbook, Sixth Edition, McGraw-Hill Co., 1984.</ref> | ||
+ | |||
+ | :The second reference to Perry's Handbook.<ref name="Perry"/> | ||
+ | |||
+ | :The third reference to Perry's Handbook and to another, related book.<ref name="Perry"/><ref>Nuclear Chemical Engineering (2nd Edition), McGraw-Hill Co., 1981.</ref> | ||
+ | |||
+ | :The only reference to Linux in a Nutshell.<ref>Linux in a Nutshell, O'Reily Co., 2003.</ref> | ||
+ | |||
+ | :A statement that requires a reference.{{fact}} | ||
+ | |} | ||
+ | |||
+ | Clicking on a numbered superscript takes you straight to the text of the corresponding footnote or reference. | ||
+ | |||
+ | The '''<nowiki><references/></nowiki>''' tag is expanded to show the text of the footnotes or references against their corresponding numbers, like this: | ||
+ | |||
+ | {|class=wikitable | ||
+ | | | ||
+ | <references/> | ||
+ | |} | ||
+ | |||
+ | For single citations, clicking on the caret (<font color=blue>'''^'''</font>) takes you to the point of citation in the main text. | ||
+ | |||
+ | For multiple citations, the links back to the main text are distinguished by letter superscripts (<font color=blue>'''''a'''''</font>, <font color=blue>'''''b'''''</font>, <font color=blue>'''''c'''''</font> etc.). Clicking on a letter superscript takes you to the corresponding citation in the main text. | ||
+ | |||
+ | === Using templates to insert reference text === | ||
+ | A number of templates, such as '''<nowiki>{{cite book}}</nowiki>''' and '''<nowiki>{{cite web}}</nowiki>''', are available to format the text between the '''<nowiki><ref></nowiki>''' and '''<nowiki></ref></nowiki>''' tags in a more structured way. These are described at [[Wikipedia:Citation templates]]. Their use is optional: they do aid with consistent formatting, but on the other hand they can make editing more cumbersome. | ||
+ | |||
+ | == See also == | ||
+ | |||
+ | * [http://en.wikipedia.org/wiki/Wikipedia:Footnotes Wikipedia:Footnotes] (Further details on this method, specific to wikipedia) | ||
+ | * http://meta.wikimedia.org/wiki/Help:Footnotes (General MediaWiki footnotes documentation) | ||
+ | * http://www.mediawiki.org/wiki/Extension:Cite/Cite.php (technical details about cite.php technology) | ||
− | |||
− | |||
− | |||
− | |||
[[category:Mediawiki]] | [[category:Mediawiki]] |
Revision as of 15:47, 15 October 2007
This page explains very briefly how to create numbered footnotes and references using the <ref> ... </ref> and <references/> syntax, which is the current best-practice method in most circumstances. See Wikipedia:Footnotes for more detail.
Important: A MediaWiki site (such as Wikipedia) must have the extension Cite/Cite.php implemented to have the <ref> and <references/> tags rendered. Extensions like Cite/Cite.php are installed after installing MediaWiki.
Single citation of a reference or footnote
At the point of citation in the main text, enter the reference or footnote like this:
- <ref>Excel For Dummies, First Edition, Hungry Minds, Inc., 1980.</ref>
You can include formatting and links in the footnote or reference text in the usual way.
When you want to note that a reference is needed, use the {{fact}} template instead.
Multiple citations of the same reference or footnote
To cite the same reference or footnote several times, identify it using the name parameter of the <ref> tag.
At one of the citation points (it makes sense to choose the first), enter the reference like this:
- <ref name="Perry">Perry's Handbook, Sixth Edition, McGraw-Hill Co., 1984.</ref>
Then, at all the other citation points just enter:
- <ref name="Perry"/>
Producing the reference or footnote list
At the point where you want the text of the footnotes or references to appear (usually at the end of the article in a "Notes" or "References" section), insert the tag:
- <references/>
What it looks like
The <ref> tags in the main text are converted to auto-numbered superscripts, and {{fact}} is expanded to "citation needed", like this:
|
Clicking on a numbered superscript takes you straight to the text of the corresponding footnote or reference.
The <references/> tag is expanded to show the text of the footnotes or references against their corresponding numbers, like this:
For single citations, clicking on the caret (^) takes you to the point of citation in the main text.
For multiple citations, the links back to the main text are distinguished by letter superscripts (a, b, c etc.). Clicking on a letter superscript takes you to the corresponding citation in the main text.
Using templates to insert reference text
A number of templates, such as {{cite book}} and {{cite web}}, are available to format the text between the <ref> and </ref> tags in a more structured way. These are described at Wikipedia:Citation templates. Their use is optional: they do aid with consistent formatting, but on the other hand they can make editing more cumbersome.
See also
- Wikipedia:Footnotes (Further details on this method, specific to wikipedia)
- http://meta.wikimedia.org/wiki/Help:Footnotes (General MediaWiki footnotes documentation)
- http://www.mediawiki.org/wiki/Extension:Cite/Cite.php (technical details about cite.php technology)