Template:R
Contents
Intent
Provides a simple wrapper for up to nine consecutive <ref name=RefName/> citation tags that minimizes visual impact on the text which, along with the simpler syntax, increases code readability and ease of editing.
Comparison to <ref>
Note how much shorter the coding is when using {{r}}
.
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/>
|
---|---|
Using {{r}} | For example, fact{{r|RefName|Bam|Bar}} and fact.{{r|Bas|Bay|Baz}}
|
References using {{r}} and references using <ref>
can coexist on the same page.
Usage
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 |
|
{{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|RefName|Bam|Bar|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}}{{r|Bar|p=10–14}}{{r|Bas|p=§C}} .
Multiple "bundled" citations with page numbers in a single call utilizing numbered Note that not all references have location identifiers; use care in ensuring the corresponding The name parameters may also be numbered to ensure accuracy, as shown in the last two examples, which also demonstrate that you may group all the name parameters and page parameters, or list them sequentially. |
{{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. Location identifiers may also be used as detailed above. |
The ref names must be defined; this is normally done in a References section (as demonstrated below). The separate Notes section is also illustrated.
===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
- 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 Wikipedia: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 Wikipedia:Citing sources, a recommended way of combining a list of several consecutive footnotes into a single footnote.
- Wikipedia:Footnotes
- Wikipedia:Citing sources
The above documentation is transcluded from Template:R/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |