Changes

Jump to navigation Jump to search
4,699 bytes added ,  17:06, 13 October 2009
New page: {{toplink |linkpage =Help:Extensions |linktext =Extensions |pagetype=Help }} '''Cite.php''' is a Cite extension that adds two parser hooks to MediaWiki, <code><ref><...
{{toplink
|linkpage =Help:Extensions
|linktext =Extensions
|pagetype=Help
}}

'''Cite.php''' is a [[Extension:Cite|Cite]] extension that adds two parser hooks to MediaWiki, <code>&lt;ref></code> and <code>&lt;references /></code>; these operate together to add citations to pages.

== Usage ==

The basic concept of the &lt;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 &lt;references />. The new format cannot be used interchangeably with the old format - you must pick one or the other.

If you forget to include &lt;references /> in the article, the footnotes will not appear, but a red error message will be displayed at the end of the page.

This page itself uses footnotes, such as the one at the end of this sentence.<ref>This footnote is used as an example in the "How to use" section.</ref> If you [{{fullurl:{{FULLPAGENAME}}|action=edit}} view the source] of this page by clicking "Edit this page", you can see a working example of footnotes.

=== Example ===
<blockquote>
<tt>
According to scientists, the Sun is pretty big.<font color=red>'''&lt;ref>'''E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23-5.'''&lt;/ref>'''<br/></font>
The Moon, however, is not so big.<font color=red>'''&lt;ref>'''R. Smith, "Size of the Moon", ''Scientific American'', 46 (April 1978): 44-6.'''&lt;/ref>'''<br/></font>
<br/>
&#61;=Notes==
<br/>
<font color=red>'''&lt;references/></font>
</tt>
</blockquote>

View a page with this example on it [[Extension:Cite/Example|here]].

=== Multiple uses of the same footnote ===

To give a footnote a unique identifier, use '''&lt;ref name="name">'''. You can then refer to the same footnote again by using a ref tag with the same name. The text inside the second tag doesn't matter, because the text already exists in the first reference. You can either copy the whole footnote, or you can use a terminated empty ref tag that looks like this: '''&lt;ref name="name" />'''.

In the following example, the same source is cited three times.

<blockquote>
<tt>
This is an example of multiple references to the same footnote.<font color=red>'''&lt;ref name&#61;"multiple">'''Remember that when you refer to the same footnote multiple times, the text from the first reference is used.'''&lt;/ref>'''</font>
<br/>
<br/>
Such references are particularly useful when citing sources, if different statements come from
the same source.<font color=red>'''&lt;ref name&#61;"multiple">'''This text is superfluous, and won't show up anywhere. We may as well just use an empty tag.'''&lt;/ref>'''</font>
<br/>
<br/>
A concise way to make multiple references is to use empty ref tags, which have a slash at the
end. Although this may reduce redundant work, please be aware that if a future editor removes the first reference, this will result in the loss of all references using the empty ref tags.<font color=red>'''&lt;ref name&#61;"multiple" />'''</font>
<br/>
<br/>
&#61;=Notes==
<br/>
<font color=red>'''&lt;references/>'''</font>
</tt>
</blockquote>

The text above gives the following result in the article (see also section below):
<blockquote>
This is an example of multiple references to the same footnote.<ref name="multiple">Remember that when you refer to the same footnote multiple times, the text from the first reference is used.</ref>
<br/>
<br/>
Such references are particularly useful when citing sources, when different statements come from the same source.<ref name="multiple">This text is superfluous, and won't show up anywhere. We may as well just use an empty tag.</ref>
<br/>
<br/>
A concise way to make multiple references is to use empty ref tags, which have a slash at the end. Although this may reduce redundant work, please be aware that if a future editor removes the first reference, this will result in the loss of all references using the empty ref tags.<ref name="multiple" />
</blockquote>

=== &lt;references /&gt; ===
Placing <code>&lt;references /></code> inserts the full text of all pending inline citations defined by <code>&lt;ref></code>, anywhere on the page. For example, based on the citations above, the code:
:<code>&lt;references /&gt;</code>

will yield:

<references/>

In some language editions of Wikipedia, long reference lists may be placed using the template <code>{{[[w:Template:Reflist|Reflist]]}}</code>, which incorporates <code>&lt;references /&gt;</code>. It provides an optional parameter to display the reference list in multiple columns. For instance, the English, Hindi and Interlingua Wikipedias use the css selector <code>references-small</code> to make the reference text smaller than normal text.

Navigation menu