Community Central
Community Central
m (→‎See also: simplified link)
Tags: Help sourceedit
(Undo revision 3443594 by Smack the goofy out ya (wall))
Tags: Undo Help
(36 intermediate revisions by 30 users not shown)
Line 1: Line 1:
  +
{{Extension infobox
The cite extension on Wikia allows you to add '''footnotes''' and '''references''' to articles, like this.<ref>Like this!</ref>
 
   
  +
| version =
==How to use it==
 
  +
| author = Ævar Arnfjörð Bjarmason, Andrew Garrett, Brion Vibber, Ed Sanders, Marius Hoch, Steve Sanbeg, Trevor Parscal and others
Citations are enabled by default. To create a footnote or reference, simply switch to source mode while editing and then place your text inside '''<nowiki><ref></ref></nowiki>''' tags. In source mode, the first sentence on this page would look like this:
 
  +
| link = [[mw:Extension:Cite|MediaWiki.org]]
  +
| desc = {{int:cite-desc}}
  +
| default = yes
  +
}}
  +
{{tocright}}
 
The '''cite''' feature allows you to add '''footnotes''' and '''references''' to articles, like this.<ref>Like this!</ref>
   
 
== How to use it ==
:''The cite extension allows you to add '''footnotes''' and '''references''' to articles, like this.<nowiki><ref>Like this!</ref></nowiki>''
 
 
To create a footnote or reference, simply switch to source mode while editing and then place your text inside '''<nowiki><ref></ref></nowiki>''' tags. In source mode, the first sentence on this page would look like this:
  +
 
:''The '''cite''' feature allows you to add '''footnotes''' and '''references''' to articles, like this.<nowiki><ref>Like this!</ref></nowiki>''
   
 
At the end of the page create a references, footnotes, or citations section and include the code '''<nowiki><references /></nowiki>'''. This will create a numbered listing of your footnotes<ref>Like this!</ref>.
 
At the end of the page create a references, footnotes, or citations section and include the code '''<nowiki><references /></nowiki>'''. This will create a numbered listing of your footnotes<ref>Like this!</ref>.
   
==Named references==
+
== Named references ==
To give a footnote a unique identifier, use '''<nowiki><ref name="Here be dragons"></nowiki>'''footnote text'''<nowiki></ref></nowiki>'''.<ref name="Here be dragons">Beware!</ref> You can then refer to the same footnote again by using a ref tag with the same name. The name cannot be a number, or the extension will return an error.
+
To give a footnote a unique identifier, use <code><nowiki><ref name="identifier"></nowiki>'''footnote text'''<nowiki></ref></nowiki></code>.<ref name="identifier">'''footnote text'''</ref> You can then refer to the same footnote again by using a ref tag with the same name. '''Note:''' the name cannot be a number, or it will return an error.
   
 
Only the first occurrence of text in a named ref will be used, although that occurrence may be located anywhere in the article. For legibility, putting the full footnote first is recommended.
 
Only the first occurrence of text in a named ref will be used, although that occurrence may be located anywhere in the article. For legibility, putting the full footnote first is recommended.
   
For subsequent identical references, use a terminated empty ref tag that looks like this: '''<nowiki><ref name="Here be dragons" /></nowiki>'''.<ref name="Here be dragons"/>
+
For subsequent identical references, use a self-closing empty ref tag that looks like this: <code><nowiki><ref name="identifier" /></nowiki></code>.<ref name="identifier" />
  +
 
When deleting content with footnotes, make sure you do not delete the named citation which holds all the reference information. This will result in an error for all the other footnotes depending on it. Remember to copy the <code><nowiki><ref name="identifier">footnote text</ref></nowiki></code> to one of the identical references.
  +
  +
== Grouped references ==
  +
To separate different kinds of references into individual lists, use <code><nowiki><ref group="identifier"></nowiki>'''grouped reference text'''<nowiki></ref></nowiki></code>.<ref group="identifier">'''grouped reference text'''</ref> To list the references in the group, use <code><nowiki><references group="identifier"/></nowiki></code>. In this way you can create multiple partial reference lists.
  +
  +
All reference lists have to be located after all the related references, otherwise they will render errors.
  +
  +
<references group="identifier"/>
   
 
== Citation needed! ==
When deleting content with footnotes, make sure you do not delete the named citation which holds all the reference information. This will result in an error for all the other footnotes depending on it. Remember to copy the '''<nowiki><ref name="Here be dragons">Beware!</ref></nowiki>''' to one of the identical references.
 
 
Some communities use a template to flag information that need citations. Often that means adding <code><nowiki>{{fact}}</nowiki></code> or <code><nowiki>{{cite}}</nowiki></code> just after the text in question.
   
 
To create one of these templates, start a new page called Template:Fact. Switch to source mode, and use the following code:
==Citation needed!==
 
Some wikias use a template to flag information that need citations. Often that means adding <code><nowiki>{{fact}}</nowiki></code> or <code><nowiki>{{cite}}</nowiki></code> just after the text in question.
 
   
 
:<code><nowiki><sup><span title="This claim needs references to reliable sources" style="white-space: nowrap;">[''citation needed'']</span></sup></nowiki></code>
To create one of these templates, start a new page called Template:Fact. Switch to source mode, and paste the following code into the page:
 
:<code><nowiki><sup><span title="This claim needs references to reliable sources" style="white-space: nowrap">[''citation needed'']</span></sup></nowiki></code>
 
...which creates <sup><span style="white-space: nowrap" title="This claim needs references to reliable sources">[''citation needed'']</span></sup>.
 
   
 
This will create <sup><span style="white-space: nowrap;" title="This claim needs references to reliable sources">[''citation needed'']</span></sup>.
Then publish the template.
 
   
==More fun with citations==
+
== More fun with citations ==
Eventually, you may want to create templates specifically for use in references to keep order - for example, a template for web addresses, another for book references.
+
Eventually, you may want to create templates specifically for use within references to keep order - for example, a template for web addresses, another for book references.
   
Finally, you may wish to customize the references list design itself, such as giving it two columns or reducing the text size slightly. See {{#NewWindowLink:http://templates.wikia.com/index.php?title=Template:Reflist|Template:Reflist}} as an example.
+
Finally, you may wish to customize the references list design itself, such as giving it two columns or reducing the text size slightly. This can be done effectively with [[Help:CSS and JS customization|CSS]], using the <code>.references</code> class as a selector.
   
==Citation templates==
+
== Citation templates ==
If your wikia deals with an academic subject, you may wish to have default citation templates, including {{Tl|cite book}}, and {{Tl|cite journal}}. The non-Lua versions of these templates can be found for example, on [[w:c:psiepsilon:Template:Cite book]] and [[w:c:psiepsilon:Template:Cite journal]].
+
If your community deals with an academic subject, you may wish to have default citation templates. The non-Lua versions of these templates can be found on [[w:c:psiepsilon:Template:Cite book]] and [[w:c:psiepsilon:Template:Cite journal]].
   
==References==
+
== References ==
<references/>
+
<references responsive="0" />
   
==See also==
+
== See also ==
 
* [[wikipedia:Wikipedia:Footnotes|Footnote guidelines on Wikipedia]]
 
* [[wikipedia:Wikipedia:Footnotes|Footnote guidelines on Wikipedia]]
* [[mw:Extension:Cite]] for extension info.
+
* [[mw:Help:Cite]]
  +
* [[mw:Extension:Cite]] for extension info
   
==Next steps==
+
== Next steps ==
*[[Help:Links|Creating Links]]
+
* [[Help:Links|Creating links]]
*[[Help:Templates|Templates]]
+
* [[Help:Templates|Templates]]
   
 
== Further help and feedback ==
 
== Further help and feedback ==
 
{{Help and feedback section}}
 
{{Help and feedback section}}
   
  +
[[de:Hilfe:Einzelnachweise]]
 
[[es:Ayuda:Cita]]
 
[[es:Ayuda:Cita]]
 
[[fr:Aide:Cite]]
 
[[fr:Aide:Cite]]
  +
[[hi:सहायता:उद्धरण]]
 
[[it:Aiuto:Note]]
 
[[it:Aiuto:Note]]
 
[[ja:ヘルプ:引用文献・出典・脚注]]
 
[[ja:ヘルプ:引用文献・出典・脚注]]
  +
[[ko:도움말:인용]]
 
[[pt:Ajuda:Cite]]
 
[[pt:Ajuda:Cite]]
 
[[ru:Справка:Примечания]]
 
[[ru:Справка:Примечания]]
  +
[[tr:Yardım:Kaynakça]]
  +
[[uk:Довідка:Примітки]]
 
[[vi:Trợ giúp:Cước chú]]
 
[[zh:Help:引用]]
 
[[zh:Help:引用]]
[[vi:Trợ giúp:Trích dẫn]]
 
   
  +
[[Category:Help]]
 
[[Category:Editing]]
 
[[Category:Editing]]
 
[[Category:Source editing]]
 
[[Category:Source editing]]
[[Category:Help|{{PAGENAME}}]]
+
[[Category:Common extensions]]

Revision as of 19:46, 7 June 2021

The cite feature allows you to add footnotes and references to articles, like this.[1]

How to use it

To create a footnote or reference, simply switch to source mode while editing and then place your text inside <ref></ref> tags. In source mode, the first sentence on this page would look like this:

The cite feature allows you to add footnotes and references to articles, like this.<ref>Like this!</ref>

At the end of the page create a references, footnotes, or citations section and include the code <references />. This will create a numbered listing of your footnotes[2].

Named references

To give a footnote a unique identifier, use <ref name="identifier">footnote text</ref>.[3] You can then refer to the same footnote again by using a ref tag with the same name. Note: the name cannot be a number, or it will return an error.

Only the first occurrence of text in a named ref will be used, although that occurrence may be located anywhere in the article. For legibility, putting the full footnote first is recommended.

For subsequent identical references, use a self-closing empty ref tag that looks like this: <ref name="identifier" />.[3]

When deleting content with footnotes, make sure you do not delete the named citation which holds all the reference information. This will result in an error for all the other footnotes depending on it. Remember to copy the <ref name="identifier">footnote text</ref> to one of the identical references.

Grouped references

To separate different kinds of references into individual lists, use <ref group="identifier">grouped reference text</ref>.[identifier 1] To list the references in the group, use <references group="identifier"/>. In this way you can create multiple partial reference lists.

All reference lists have to be located after all the related references, otherwise they will render errors.

  1. grouped reference text

Citation needed!

Some communities use a template to flag information that need citations. Often that means adding {{fact}} or {{cite}} just after the text in question.

To create one of these templates, start a new page called Template:Fact. Switch to source mode, and use the following code:

<sup><span title="This claim needs references to reliable sources" style="white-space: nowrap;">[''citation needed'']</span></sup>

This will create [citation needed].

More fun with citations

Eventually, you may want to create templates specifically for use within references to keep order - for example, a template for web addresses, another for book references.

Finally, you may wish to customize the references list design itself, such as giving it two columns or reducing the text size slightly. This can be done effectively with CSS, using the .references class as a selector.

Citation templates

If your community deals with an academic subject, you may wish to have default citation templates. The non-Lua versions of these templates can be found on w:c:psiepsilon:Template:Cite book and w:c:psiepsilon:Template:Cite journal.

References

  1. Like this!
  2. Like this!
  3. 3.0 3.1 footnote text

See also

Next steps

Further help and feedback