साचा:R
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/> Displays as: For example, fact[१][२][३] and fact.[४][५][६]
|
---|---|
Using {{r}} | For example, fact{{r|RefName|Bam|Bar}} and fact.{{r|Bas|Bay|Baz}} Displays as: For example, fact[१][२][३] and fact.[४][५][६]
|
List-defined references and references defined in the body of the article may be mixed on a page—this is not a technical limitation of the template. However, this may be confusing to ongoing editors, and should be normalized to a single format.
Usage
संपादनUsage | Display | Notes |
---|---|---|
{{r|RefName}}
|
Text.[१] | Adds a citation marker equivalent to <ref name=RefName/> .
|
{{r|RefName|p=100}} {{r|RefName|pp=100}} {{r|RefName|page=100}} {{r|RefName|pages=100}}
|
Text.[१]:100 | Adds a citation marker with a location identifier within the source.All forms—|p= , |pp= , |page= , and |pages= —are equivalent.Only use where there are multiple references to one source, each to a different location within the source.If the article cites only one location in a given source, reduce clutter in the article text by integrating the location into the main citation, instead of using |p= or its aliases.
|
{{r|RefName|p=10–14}} {{r|RefName|pp=3, 6}} {{r|RefName|page=§C}} {{r|RefName|pages=Front jacket flap}}
|
Text.[१]:10–14Text.[१]:3, 6Text.[१]:§CText.[१]:Front jacket flap | |
{{r|RefName|Bam|Bar}}
|
Text.[१][२][३] | Up to nine references may be bundled in a single use of {{r}}.This example is the equivalent of <ref name=RefName/><ref name=Bam/><ref name=Bar/> .
|
{{r|RefName|Bam|Bar|Bas|p1=100|p2=10–14|p4=§C}} {{r|1=RefName|2=Bam|3=Bar|4=Bas|p1=100|p2=10–14|p4=§C}} {{r|1=RefName|p1=100|2=Bam|p2=10–14|3=Bar|4=Bas|p4=§C}}
|
Text.[१]:100[२]:10–14[३][४]:§C | Combines page references in a single call of {{r}} by utilizing numbered |p= parameters.Note that not all references have location identifiers, use care in ensuring the corresponding |p= parameter number is listed for the correct reference.The name parameters may also be numbered to ensure accuracy, as shown in the last two examples.Note too that you may group all the name parameters and page parameters, or list them sequentially.
|
{{r|group=Notes|NtName}} {{r|grp=Notes|NtName|NtCam}} {{r|g=Notes|NtName|p=13}}
|
Text.[Notes १]Text.[Notes १][Notes २]Text.[Notes १]: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:
References
Notes
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