Difference between revisions of "Help:Cite"
(Created page with '__NOTOC__ This help article explains how to add a reference or footnote to an article. There are a few items you will need to know about: * The <nowiki><ref></ref></nowiki> tags…') |
m (updated to use {{ref}}}) |
||
Line 3: | Line 3: | ||
There are a few items you will need to know about: |
There are a few items you will need to know about: |
||
− | * The |
+ | * The {{T|ref}} template |
* The <nowiki><references /></nowiki> tag |
* The <nowiki><references /></nowiki> tag |
||
− | * The {{T|bref}} template |
||
− | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
If you try and save the article now, you might get the following error: |
If you try and save the article now, you might get the following error: |
||
<strong class=error><nowiki>Cite error: <ref> tags exist, but no <references/> tag was found</nowiki></strong> |
<strong class=error><nowiki>Cite error: <ref> tags exist, but no <references/> tag was found</nowiki></strong> |
||
Line 26: | Line 24: | ||
If you want to reuse a reference, say two parts of the article refer to the same chapter, you can add a name to the reference which allows you to reuse it somewhere else. This is done as follows |
If you want to reuse a reference, say two parts of the article refer to the same chapter, you can add a name to the reference which allows you to reuse it somewhere else. This is done as follows |
||
− | This is the first fact<nowiki> |
+ | This is the first fact<nowiki>{{ref|name=NAME|this is a reference that gets used multiple times}}</nowiki>{{ref|name=NAME|this is a reference that gets used multiple times}} |
− | This is another fact that needs the sane reference<nowiki><ref name=NAME /></nowiki><ref name=NAME /> |
+ | This is another fact that needs the sane reference<nowiki>{{ref|name=NAME|empty=true}}</nowiki>{{ref|name=NAME|empty=true}} or <nowiki><ref name=NAME /></nowiki><ref name=NAME /> |
+ | The empty=true argument is optional, and should only be used to defer the text to a following named reference.<nowiki>{{ref|name=NAME}}</nowiki>{{ref|name=NAME}} |
||
=== Notes === |
=== Notes === |
||
Line 37: | Line 36: | ||
This is a statement which needs notating |
This is a statement which needs notating |
||
− | <nowiki> |
+ | <nowiki>{{ref|group=nb|And this is a notation}}</nowiki>{{ref|group=nb|And this is a notation}} |
Where as this needs a reference |
Where as this needs a reference |
||
− | <nowiki> |
+ | <nowiki>{{ref|This tag doesnt even have a group}}</nowiki>{{ref|This tag doesnt even have a group}} |
=== Notes === |
=== Notes === |
||
<nowiki><references /></nowiki> |
<nowiki><references /></nowiki> |
||
<references /> |
<references /> |
||
− | + | ; notations: |
|
<nowiki><references group=nb /></nowiki> |
<nowiki><references group=nb /></nowiki> |
||
<references group=nb /> |
<references group=nb /> |
Revision as of 06:15, 26 April 2012
This help article explains how to add a reference or footnote to an article.
There are a few items you will need to know about:
- The
{{ref}}
template - The <references /> tag
The easiest way to add a reference to an article is by adding {{ref|This is a reference}}.
It will appear like this Cite error: Invalid <ref>
tag; refs with no name must have content
If you try and save the article now, you might get the following error:
Cite error: <ref> tags exist, but no <references/> tag was found
This is because it wants to add a list of all the references you've added to the article, but you havent told it where to do this. The best and most preferred place for them is at the end of the article in a section called Notes, along with any Categories and Information tables. To do this, add a section at the end as follows
== Notes == <references /> info tables categories
This will produce a list as follows
Notes
Named references
If you want to reuse a reference, say two parts of the article refer to the same chapter, you can add a name to the reference which allows you to reuse it somewhere else. This is done as follows
This is the first fact{{ref|name=NAME|this is a reference that gets used multiple times}}[1]
This is another fact that needs the sane reference{{ref|name=NAME|empty=true}}[1] or <ref name=NAME />[1] The empty=true argument is optional, and should only be used to defer the text to a following named reference.{{ref|name=NAME}}[1]
Notes
Notes versus References
Some articles have points which aren't references, but still need to be notation rather than part of the article proper. This can be accomplished with the group tag.
This is a statement which needs notating
{{ref|group=nb|And this is a notation}}Cite error: Invalid <ref>
tag; refs with no name must have content
Where as this needs a reference
{{ref|This tag doesnt even have a group}}Cite error: Invalid <ref>
tag; refs with no name must have content
Notes
<references />
- notations
<references group=nb />