Difference between revisions of "References - Mediawiki"

From Help Wiki
(Usage)
 
(20 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Usage ==
+
__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.
  
Use this template to create a reference list in an article with a small font.  Note that there is no consensus that small font size should always be used for all references; when normal-sized font is more appropriate on an article, use <code><nowiki><references /></nowiki></code> instead.
 
  
If used with no parameters, it will produce a reference list with a single column.
+
===Single citation of a reference or footnote===
  
=== Multiple columns ===
+
At the point of citation in the main text, enter the reference or footnote like this:
  
Using <code><nowiki>{{reflist|2}}</nowiki></code> will create a two-column reference list, and <tt><nowiki>{{reflist|3}}</nowiki></tt> will create a three-column list.
+
:'''<nowiki><ref>Excel For Dummies, First Edition, Hungry Minds, Inc., 1980.</ref></nowiki>'''
  
Using <code><nowiki>{{reflist|colwidth=30em}}</nowiki></code> will allow the browser to automatically choose the number of columns based on the width of the web browser.  Choose a column width that's appropriate for the average width of the references on the page.
+
You can include formatting and links in the footnote or reference text in the usual way.
  
Note: multiple columns currently render properly only in Mozilla Firefox and other Gecko-based browsers,<ref>Multi-Column Thriller|url=http://www.stuffandnonsense.co.uk/archives/css3_multi-column_thriller.html</ref> and Safari (web browser)|Safari<ref>http://www.css3.info/preview/multi-column-layout.html |title=Multi-column layout in Safari 3 and Firefox |accessdate=2007-07-25</ref> though the feature is included in CSS3, so it should work for a larger number of browsers in the future.<ref>url=http://www.w3.org/TR/css3-multicol/|title=CSS3 module: Multi-column layout|publisher=W3C]]|date=2005-12-15|accessdate=2006-11-24</ref>
 
  
===Three options for usage===
+
===Multiple citations of the same reference or footnote===
====Option 1 (only specific references) — Example: The Rule====
+
<pre>
+
==Content==
+
Lorem ipsum.<ref>Source name, access date, etc.</ref>
+
  
Lorem ipsum dolor sit amet.<ref>Source name, access date, etc.</ref>
+
To cite the same reference or footnote several times, identify it using the '''name''' parameter of the '''<nowiki><ref></nowiki>''' tag.
  
== References ==
+
At ''one'' of the citation points (it makes sense to choose the first), enter the reference like this:
{{reflist}}
+
</pre>
+
  
==== Option 2 (only general references) — Example: National Publications ====
+
:'''<nowiki><ref name="Perry">Perry's Handbook, Sixth Edition, McGraw-Hill Co., 1984.</ref></nowiki>'''
<pre>
+
==Content==
+
Lorem ipsum.
+
  
Lorem ipsum dolor sit amet.
+
Then, at all the other citation points just enter:
  
==References==
+
:'''<nowiki><ref name="Perry"/></nowiki>'''
{{refbegin}}
+
* general reference 1
+
* general reference 2
+
{{refend}}
+
</pre>
+
  
====Option 3 (both specific and general references) — Example: Elephant====
+
===Producing the reference or footnote list===
<pre>
+
==Content==
+
Lorem ipsum.<ref>Source name, access date, etc.</ref>
+
  
Lorem ipsum dolor sit amet.<ref>Source name, access date, etc.</ref>
+
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:
  
Lorem ipsum.
+
:'''<nowiki><references/></nowiki>'''
  
Lorem ipsum dolor sit amet.
+
===What it looks like ===
  
==References==
+
The '''<nowiki><ref></nowiki>''' tags in the main text are converted to auto-numbered superscripts, like this:
{{reflist}}
+
  
{{refbegin}}
+
{|class=wikitable
* general reference 1
+
|
* general reference 2
+
:The only reference to Excel For Dummies.<ref>Excel For Dummies, First Edition, Hungry Minds, Inc., 1980.</ref>
{{refend}}
+
</pre>
+
  
==Content==
+
:The first reference to Perry's Handbook.<ref name="Perry">Perry's  Handbook, Sixth Edition, McGraw-Hill Co., 1984.</ref>  
Lorem ipsum.<ref>Source name, access date, etc.</ref>
+
  
Lorem ipsum dolor sit amet.<ref>Source name, access date, etc.</ref>
+
:The second reference to Perry's Handbook.<ref name="Perry"/>&nbsp;&nbsp;&nbsp;
  
== References ==
+
: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>
{{reflist}}
+
</pre>
+
  
==== Option 2 (only general references) — Example: National Publications ====
+
:The only reference to Linux in a Nutshell.<ref>Linux in a Nutshell, O'Reily Co., 2003.</ref>
<pre>
+
==Content==
+
Lorem ipsum.
+
  
Lorem ipsum dolor sit amet.
+
|}
  
==References==
+
Clicking on a numbered superscript takes you straight to the text of the corresponding footnote or reference.
{{refbegin}}
+
* general reference 1
+
* general reference 2
+
{{refend}}
+
</pre>
+
  
====Option 3 (both specific and general references) — Example: Elephant====
+
The '''<nowiki><references/></nowiki>''' tag is expanded to show the text of the footnotes or references against their corresponding numbers, like this:
<pre>
+
==Content==
+
Lorem ipsum.<ref>Source name, access date, etc.</ref>
+
  
Lorem ipsum dolor sit amet.<ref>Source name, access date, etc.</ref>
+
{|class=wikitable
 +
|
 +
<references/>
 +
|}
  
Lorem ipsum.
+
For single citations, clicking on the caret (<font color=blue>'''^'''</font>) takes you to the point of citation in the main text.
  
Lorem ipsum dolor sit amet.
+
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.
  
==References==
+
=== Using templates to insert reference text ===
{{reflist}}
+
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 [http://en.wikipedia.org/wiki/Wikipedia:Citation_templates Citation Templates]. Their use is optional: they do aid with consistent formatting, but on the other hand they can make editing more cumbersome.
  
{{refbegin}}
+
== See also ==
* general reference 1
+
----
* general reference 2
+
* [http://en.wikipedia.org/wiki/Wikipedia:Footnotes Wikipedia:Footnotes] (Further details on this method, specific to wikipedia)
{{refend}}
+
* http://meta.wikimedia.org/wiki/Help:Footnotes (General MediaWiki footnotes documentation)
</pre>
+
* http://www.mediawiki.org/wiki/Extension:Cite/Cite.php (technical details about cite.php technology)
  
==Continuing the references==
 
In order to add references manually, use the "#" sign and enclose the additional references in the <tt>"references-small"</tt> div style, as in this example:
 
<pre>
 
<div class="references-small">
 
#<li value="2"> [http://saturn.jpl.nasa.gov/news/features/feature20070719.cfm ''Cassini-Huygens: NEWS - Features - Saturn Turns 60'']
 
# [http://www.scitech.ac.uk/PMC/PRel/STFC/frank.aspx ''A new moon for Saturn a family affair'']
 
# [http://ciclops.org/view.php?id=3353 ''From Dark Obscurity… A Tiny New Saturnian Moon Comes To Light'']
 
</div>
 
</pre>
 
 
The <code><nowiki><li value="2"></nowiki></code> tag is used to ensure the new references start at the correct number. In the example, there was just one reference. Had there been 10, we would have started the additional references at "11".
 
 
==See also==
 
*http://en.wikipedia.org/wiki/Category:Citation_templates
 
 
==References==
 
{{reflist}}
 
  
 +
{{Mediawiki Help}}
 
  [[category:Mediawiki]]
 
  [[category:Mediawiki]]

Latest revision as of 16:13, 15 November 2016

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.


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.


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, like this:

The only reference to Excel For Dummies.[1]
The first reference to Perry's Handbook.[2]
The second reference to Perry's Handbook.[2]   
The third reference to Perry's Handbook and to another, related book.[2][3]
The only reference to Linux in a Nutshell.[4]

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:

  1. Excel For Dummies, First Edition, Hungry Minds, Inc., 1980.
  2. 2.0 2.1 2.2 Perry's Handbook, Sixth Edition, McGraw-Hill Co., 1984.
  3. Nuclear Chemical Engineering (2nd Edition), McGraw-Hill Co., 1981.
  4. Linux in a Nutshell, O'Reily Co., 2003.

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 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



Mediawiki Help