Other languages:
Cite.php is a Cite extension that adds two parser hooks to MediaWiki, <ref> and <references>; these operate together to add citations to pages.
This version requires at least Mediawiki 1.6x.
require_once( "extensions/Cite.php" );line to your LocalSettings.php (Directly below: require_once( "includes/DefaultSettings.php" ); )
?> at the bottom of LocalSettings.php:
include( "extensions/Cite.php" );
If you forget to include
This page itself uses footnotes, such as the one at the end of this sentence.This footnote is used as an example in the "How to use" section. If you view the Wikicode of this page by clicking "Edit this page", you can see a working example of footnotes.
According to scientists, the Sun is pretty big.<ref>Miller, E: "The Sun.", page 23. Academic Press, 2005</ref>
The Moon, however, is not so big.<ref>Smith, R: "Size of the Moon", Scientific American, 46(78):46</ref>
==Notes==
'''<references/>
To give a footnote a unique identifier, use
In the following example, the same source is cited three times.
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>
Such references are particularly useful when citing sources, if 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>
A concise way to make multiple references is to use empty ref tags, which have a slash at the end.<ref name="multiple" />
==Notes==
<references/>
The text above gives the following result in the article (see also Notes section below):
This is an example of multiple references to the same footnote.Remember that when you refer to the same footnote multiple times, the text from the first reference is used.
Such references are particularly useful when citing sources, when different statements come from the same source.This text is superfluous, and won't show up anywhere. We may as well just use an empty tag.
A concise way to make multiple references is to use empty ref tags, which have a slash at the end.
<references/> inserts the full text of all pending inline citations defined by <ref>, anywhere on the page. For example, based on the citations above, the code:
<references/>
will yield:
On Wikipedia, references are often made smaller than normal text, using the code:
<references/>
<ref> and <references> is almost completely customizable through MediaWiki messages, that can be modified, for example, through the MediaWiki namespace depending on the configuration of the wiki.
For a list of messages that control the output of <ref> and <references> and the values, if any, that are passed to them ($1, $2, $3 ...), see the code in CVS for an up-to-date listing of their default contents.
<ref> in templates breaks numbering:Issue with MediaWiki regarding in what order things are parsed
<ref> within a template will create correctly numbered reference mark but it will be missing from the output of a <reference /> on the calling page. (example)
<ref>, e.g. <ref name=} >:Issue with MediaWiki, see 4529
title attribute (<a href="..." title="">...):Issue with MediaWiki, not this extension. MediaWiki will generate output like <a href="#foo" title="">bar</a> when given input like bar
<ref> with HTML comments <--…--> hides the citation but the reference still appears on the list
<ref> tag.
<ref> are not rendered, even if all prior tags with same name are empty.
Another criticism is that, unlike Footnotes3, it is currently impossible to separate bibliographic information from article copy.
However, at least one editor, User:Ta bu shi da yu has found it incredibly useful in splitting articles and shifting text with footnotes around the article. Before, a paragraph with a footnote needed to be moved, and multiple footnotes in the Notes section shifted. This was very difficult to do. With Cite.php, reorganising text and splitting articles is considerably easier.
<ref> in image captions breaks the XHTML output:Issue with MediaWiki, not this extension, see 1887.
They are actually very similar.
This article is licensed under the GNU Free Documentation License.
It uses material from the
"Cite/Cite.php".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world