Template:R/doc
This is a documentation subpage for Template:R. It contains usage information, categories and other content that is not part of the original template page. |
Intent[edit source]
Provides a compact shorthand for <ref name="RefName" />
citation tags, simplifying syntax so cutting code clutter.[note 1]
For example:
Using <ref>
|
For example, fact<ref name=RefName/><ref name=Bam/><ref name=Bar/> and fact.<ref name=Bas/><ref name=Bay/><ref name=Baz/>
|
---|---|
Instead using {{r}}
|
For example, fact{{r|RefName|Bam|Bar}} and fact.{{r|Bas|Bay|Baz}}
|
{{r}}
and <ref>
can coexist on the same page, and like <ref>
, {{r}}
can be used with or without list-defined references. In addition, a |page=
or |p=
parameter adds the functionality of {{rp}}:
Using {{r}} with|p= parameter
|
For example, fact.{{r|RefName|p=22}}
Displays as: For example, fact.[1]:22 |
---|
Usage[edit source]
Usage | Display | Notes |
---|---|---|
{{r|RefName}}
|
Text.[1] | Equivalent to <ref name="RefName" /> .
|
{{r|RefName|p=100}}
|
Text.[1]:100 | Adds a page number (or other location identifier) within the source.
The If the article cites only one location in a given source, reduce clutter by coding simply |
{{r|RefName|p=10–14}}
|
Text.[1]:10–14
Text.[1]:3, 6 Text.[1]:§C Text.[1]:Dust jacket Text.[1]:para. 7 | |
{{r|RefName|Bam|Bar}}
|
Text.[1][2][3] | Equivalent to {{r|RefName}}{{r|Bam}}{{r|Bar}} or <ref name=RefName/><ref name=Bam/><ref name=Bar/> .
Up to nine references may be "bundled" this way. |
{{r|1=RefName|2=Bam|3=Bar|4=Bas|p1=100|p2=10–14|p4=§C}}
|
Text.[1]:100[2]:10–14[3][4]:§C | Equivalent to {{r|RefName|p=100}}{{r|Bam|p=10–14}}{{r|Bar}}{{r|Bas|p=§C}} .
In the example, not all references have pages; make sure that e.g. |
{{r|group=Notes|NtName}}
|
Text.[Notes 1]
Text.[Notes 1]:13 |
The |group= , |grp= , and |g= parameters are equivalent and echo <ref group=Notes name=NtName/> .
If present, the parameter applies to all references in the template. |
{{r|RefName|p=100|q=quote from the text}}
|
Text.[1]:100 | Makes sense only if |p= (or one of its synonyms) is present. |quote= (or |q= ) underlines the superscript page number/ |
{{r|1=RefName|2=Bam|3=Bar|4=Bas|p1=100|p2=10–14|p4=§C|q1=Quote from 100|q4=Quote from §C}}
|
Text.[1]:100[2]:10–14[3][4]:§C | In the example, not all references have quotes; make sure that e.g. |1= and |p1= and |q1= all match.
|
The ref names may be defined within a {{reflist}} (as illustrated below) or (in the more usual way) scattered throughout the article text using e.g. <ref name=RefName>Reference text</ref>
or {{refn|name=RefName|Reference text}}
.
===References=== {{reflist|refs= <ref name=RefName>Reference text.</ref> <ref name=Bam>Bam reference text.</ref> <ref name=Bar>Bar reference text.</ref> <ref name=Bas>Bas reference text.</ref> <ref name=Bay>Bay reference text.</ref> <ref name=Baz>Baz reference text.</ref> }} ===Notes=== {{reflist|group=Notes|refs= <ref name=NtName>Note text.</ref> <ref name=NtCam>Cam note text.</ref> }}
Resulting in:
See also[edit source]
- Help:List-defined references, which provides all the specifications for using List-defined references, especially with regard to naming references and groups.
- Shortened footnotes in Starfleet:Citing sources, which describes the most common way of citing multiple pages of the same source.
- {{sfn}}, a template that implements the most common way of citing multiple pages of the same source.
- Citation bundling in Starfleet:Citing sources, a recommended way of combining a list of several consecutive footnotes into a single footnote.
- Starfleet:Footnotes
- Starfleet:Citing sources
Notes[edit source]
- ^ Here we also add alliteration.