Help:Reftags

DCCWiki, a community DCC encyclopedia.
Jump to: navigation, search

This page, Help:Reftags, explains the use of the reftag element, "<ref>...</ref>" for defining reference footnotes, as displayed by using a "{{Reflist}}" template to list the footnotes or references at the bottom of a page. A reftag can also be defined by using wikitext function "{{#tag:ref|...}}" to generate the text "<ref>...</ref>".

Why use it?

It's used to show references to source material so readers can review the content or to provide additional context to the article without interrupting the flow of the article.

How to use it

Articles typically reference other material or footnotes to an article; these are referred to as reference groups. The default group is 'reference', however, some articles also have footnotes 'fn'.

The general format is <ref>Some reference text here</ref> for a simple refernece tag. An alternative and shorter format is: "{{#tag:ref|reference text here}}"

Named groupings

Rather than define hundreds of footnotes in a single list, various reftags could split to some named groupings, such as using "<ref group="fn">...</ref>"" to collect those footnotes into group name "fn" as displayed by "<references group="fn"/>".[fn 1] A group name can be multiple words in ".." or in apostrophes (group='set xx yy'), but a single-word name can omit the quotation marks or apostrophes (as: group=fn). Hence, many group names are typically one-word labels, to avoid excessive apostrophes or quotation marks.[fn 2]

Examples

  • Using "{{#tag:ref|Example of tag:ref function}}" will show a superscript number: [1] and list footnote "Example of tag:ref function" under the References.
  • Using named "{{#tag:ref|Named reftag function xx1|name=xx1}}" will show a superscript number: [2] and list footnote "Named reftag function xx1" under the References below. The footnote name 'xx1' then can be reused by putting "<ref name=xx1/>" at various points[2] in the text.[2]

Footnotes (fn)

  1. This is a sample footnote in group=fn.
  2. This footnote uses apostrophes in name group='fn'.

References

  1. Example of tag:ref function
  2. 2.0 2.1 2.2 Named reftag function xx1