https://wiki.takeapart.org/index.php?title=Template:R/doc&feed=atom&action=historyTemplate:R/doc - Revision history2024-03-29T05:49:06ZRevision history for this page on the wikiMediaWiki 1.30.0https://wiki.takeapart.org/index.php?title=Template:R/doc&diff=1082&oldid=prevMartina: 1 revision imported2018-09-06T16:28:26Z<p>1 revision imported</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr style="vertical-align: top;" lang="en">
<td colspan="1" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: white; color:black; text-align: center;">Revision as of 16:28, 6 September 2018</td>
</tr><tr><td colspan="2" style="text-align: center;" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>Martinahttps://wiki.takeapart.org/index.php?title=Template:R/doc&diff=1081&oldid=prevShakespeareFan00: Mismatched formatting repaired2018-07-20T11:43:09Z<p>Mismatched formatting repaired</p>
<p><b>New page</b></p><div>{{Documentation subpage}}<br />
{{for|[[WP:RCAT|redirect templates]]|Wikipedia:Template messages/Redirect pages}}<br />
<br />
==Intent==<br />
Provides a simple wrapper for up to nine consecutive [[mw:Extension:Cite/Cite.php|<code>&lt;ref name="RefName" /&gt;</code> citation tags]] that minimizes visual impact on the text which, along with the simpler syntax, increases code readability and ease of editing.<br />
<br />
====Comparison to <code>&lt;ref&gt;</code>====<br />
Note how much shorter the coding is when using {{tlx|r}}.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Using <code>&lt;ref&gt;</code><br />
| <code><nowiki>For example, fact<ref name=RefName/><ref name=Bam/><ref name=Bar/> and fact.<ref name=Bas/><ref name=Bay/><ref name=Baz/></nowiki></code><br />
<br />
''Displays as'': For example, fact<ref name=RefName/><ref name=Bam/><ref name=Bar/> and fact.<ref name=Bas/><ref name=Bay/><ref name=Baz/><br />
|-<br />
! Using {{tnull|r}}<br />
| <code><nowiki>For example, fact{{r|RefName|Bam|Bar}} and fact.{{r|Bas|Bay|Baz}}</nowiki></code><br />
<br />
''Displays as'': For example, fact{{r|RefName|Bam|Bar}} and fact.{{r|Bas|Bay|Baz}}<br />
|}<br />
<br />
References using {{tnull|r}} and references using <code><nowiki><ref></nowiki></code> can coexist on the same page.<br />
<br />
==Usage==<br />
{| class="wikitable"<br />
|-<br />
! Usage<br />
! Display<br />
! Notes<br />
|-<br />
| <code><nowiki>{{r|RefName}}</nowiki></code> <br />
| Text.{{r|RefName}}<br />
| Equivalent to <code><nowiki><ref name="RefName" /></nowiki></code>.<br />
|-<br />
| <code><nowiki>{{r|RefName|p=100}}</nowiki></code><br />
<br />
<code><nowiki>{{r|RefName|pp=100}}</nowiki></code><br />
<br />
<code><nowiki>{{r|RefName|page=100}}</nowiki></code><br />
<br />
<code><nowiki>{{r|RefName|pages=100}}</nowiki></code><br />
| Text.{{r|RefName|p=100}} <br />
| rowspan="2"| Adds a page number (or other location identifier) within the source.<br />
<br />
The {{para|p}}, {{para|pp}}, {{para|page}}, and {{para|pages}} parameters are equivalent.<br />
<br />
If the article cites only one location in a given source, reduce clutter by coding simply <code><nowiki>{{r|RefName}}</nowiki></code> and integrating the location into the main ''RefName'' citation.<br />
|-<br />
| <code><nowiki>{{r|RefName|p=10&ndash;14}}</nowiki></code><br />
<br />
<code><nowiki>{{r|RefName|pp=3, 6}}</nowiki></code><br />
<br />
<code><nowiki>{{r|RefName|page=&sect;C}}</nowiki></code><br />
<br />
<code><nowiki>{{r|RefName|pages=Dust jacket}}</nowiki></code><br />
<br />
<code><nowiki>{{r|RefName|pages=para. 7}}</nowiki></code><br />
| Text.{{r|RefName|p=10&ndash;14}}<br />
<br />
Text.{{r|RefName|pp=3, 6}}<br />
<br />
Text.{{r|RefName|page=&sect;C}}<br />
<br />
Text.{{r|RefName|pages=Dust jacket}}<br />
<br />
Text.{{r|RefName|pages=para. 7}}<br />
|- <br />
| <code><nowiki>{{r|RefName|Bam|Bar}}</nowiki></code><br />
| Text.{{r|RefName|Bam|Bar}}<br />
| Equivalent to <code><nowiki>{{r|RefName}}{{r|Bam}}{{r|Bar}}</nowiki></code> or {{nobr|<code><nowiki><ref name=RefName/><ref name=Bam/><ref name=Bar/></nowiki></code>.}}<br />
<br />
Up to nine references may be "bundled" this way. <!--NOBREAK ON WIDEST EXAMPLES ESTABLISHES COLUMN WIDTHS--><br />
|-<br />
| {{nobr| <code><nowiki>{{r|1=RefName|2=Bam|3=Bar</nowiki><nowiki>|4=Bas|p1=100|p2=10&ndash;14|p4=&sect;C}}</nowiki></code>}}<br />
<br />
<code><nowiki>{{r|1=RefName|p1=100|2=Bam</nowiki><nowiki>|p2=10&ndash;14|3=Bar|4=Bas|p4=&sect;C}}</nowiki></code><br />
<br />
| {{nobr| Text.{{r|RefName|Bam|Bar|Bas|p1=100|p2=10&ndash;14|p4=&sect;C}}}} <br />
| Equivalent to <code><nowiki>{{r|RefName|p=100}}{{r|Bam|p=10&ndash;14}}{{r|Bar}}{{r|Bas|p=&sect;C}}</nowiki></code>.<br />
<br />
In the example, not all references have pages; make sure that e.g. {{para|1}} matches {{para|p1}}<br />
|-<br />
| <code><nowiki>{{r|group=Notes|NtName}}</nowiki></code><br />
<br />
<code><nowiki>{{r|grp=Notes|NtName|NtCam}}</nowiki></code><br />
<br />
<code><nowiki>{{r|g=Notes|NtName|p=13}}</nowiki></code><br />
| Text.{{r|group=Notes|NtName}}<br />
<br />
Text.{{r|grp=Notes|NtName|NtCam}}<br />
<br />
Text.{{r|g=Notes|NtName|p=13}}<br />
| The {{para|group}}, {{para|grp}}, and {{para|g}} parameters are equivalent and echo {{nobr|<code><nowiki><ref group=Notes name=NtName/></nowiki></code>.}}<br />
<br />
If present, the parameter applies to all references in the template.<br />
<br />
|-<br />
| <code><nowiki>{{r|RefName|p=100|q=quote from the text}}</nowiki></code><br />
<br />
<code><nowiki>{{r|RefName|p=100|quote=quote from the text}}</nowiki></code><br />
<br />
|Text.{{r|RefName|p=100|q=quote from the text}}<br />
|Makes sense only if {{para|p}} (or one of its synonyms) is present. {{para|quote}} (or {{para|q}}) underlines the superscript page number/{{wbr}}location identifier, signaling availability of a quote from the source, which pops up when the mouse is hovered over the underlined bit. <br />
|-<br />
|<code><nowiki>{{r|1=RefName|2=Bam|3=Bar|4=Bas|p1=100|p2=10&ndash;14|p4=&sect;C|q1=Quote from 100|q4=Quote from &sect;C}}</nowiki></code><br />
||Text.{{r|1=RefName|2=Bam|3=Bar|4=Bas|p1=100|p2=10&ndash;14|p4=&sect;C|q1=Quote from 100|q4=Quote from &sect;C}}<br />
|In the example, not all references have quotes; make sure that e.g. {{para|1}} and {{para|p1}} and {{para|q1}} all match.<br />
|}<br />
<br />
The ref names must be defined; this is normally done in a References section (as demonstrated below). The separate Notes section is also illustrated.<br />
<br />
<pre><br />
===References===<br />
{{reflist|refs=<br />
<ref name=RefName>Reference text.</ref><br />
<ref name=Bam>Bam reference text.</ref><br />
<ref name=Bar>Bar reference text.</ref><br />
<ref name=Bas>Bas reference text.</ref><br />
<ref name=Bay>Bay reference text.</ref><br />
<ref name=Baz>Baz reference text.</ref><br />
}}<br />
<br />
===Notes===<br />
{{reflist|group=Notes|refs=<br />
<ref name=NtName>Note text.</ref><br />
<ref name=NtCam>Cam note text.</ref><br />
}}<br />
</pre><br />
<br />
Resulting in:<br />
<div style="padding-left:1em;border-left:1px solid #9ad"><br />
{{fake heading|sub=3|References}}<br />
{{reflist|refs=<br />
<ref name=RefName>Reference text.</ref><br />
<ref name=Bam>Bam reference text.</ref><br />
<ref name=Bar>Bar reference text.</ref><br />
<ref name=Bas>Bas reference text.</ref><br />
<ref name=Bay>Bay reference text.</ref><br />
<ref name=Baz>Baz reference text.</ref><br />
}}<br />
<br />
{{fake heading|sub=3|Notes}}<br />
{{reflist|group=Notes|refs=<br />
<ref name=NtName>Note text.</ref><br />
<ref name=NtCam>Cam note text.</ref><br />
}}<br />
</div><br />
<br />
==TemplateData==<br />
{{TemplateDataHeader}}<br />
<templatedata><br />
{<br />
"params": {<br />
"1": {<br />
"label": "Reference name 1",<br />
"description": "If this is \"RefName\", the template displays <ref name=\"RefName\"/>.",<br />
"type": "string",<br />
"required": true<br />
},<br />
"2": {<br />
"label": "Reference name 2",<br />
"description": "If this is \"RefName\", the template displays <ref name=\"RefName\"/>.",<br />
"type": "string",<br />
"suggested": true<br />
},<br />
"3": {<br />
"label": "Reference name 3",<br />
"description": "If this is \"RefName\", the template displays <ref name=\"RefName\"/>.",<br />
"type": "string",<br />
"suggested": true<br />
},<br />
"4": {<br />
"label": "Reference name 4",<br />
"description": "If this is \"RefName\", the template displays <ref name=\"RefName\"/>.",<br />
"type": "string"<br />
},<br />
"5": {<br />
"label": "Reference name 5",<br />
"description": "If this is \"RefName\", the template displays <ref name=\"RefName\"/>.",<br />
"type": "string"<br />
},<br />
"6": {<br />
"label": "Reference name 6",<br />
"description": "If this is \"RefName\", the template displays <ref name=\"RefName\"/>.",<br />
"type": "string"<br />
},<br />
"7": {<br />
"label": "Reference name 7",<br />
"description": "If this is \"RefName\", the template displays <ref name=\"RefName\"/>.",<br />
"type": "string"<br />
},<br />
"8": {<br />
"label": "Reference name 8",<br />
"description": "If this is \"RefName\", the template displays <ref name=\"RefName\"/>.",<br />
"type": "string"<br />
},<br />
"9": {<br />
"label": "Reference name 9",<br />
"description": "If this is \"RefName\", the template displays <ref name=\"RefName\"/>.",<br />
"type": "string"<br />
},<br />
"group": {<br />
"aliases": [<br />
"g",<br />
"grp"<br />
],<br />
"label": "Reference group",<br />
"description": "The reference group of all the references displayed; see WP:REFGROUP for help.",<br />
"type": "string",<br />
"default": "Defaults to not being in a group.",<br />
"suggested": true<br />
},<br />
"page1": {<br />
"aliases": [<br />
"p",<br />
"page",<br />
"pages",<br />
"pp",<br />
"p1",<br />
"pages1",<br />
"pp1"<br />
],<br />
"label": "Pages number(s): reference 1",<br />
"description": "Adds a page number (or other location identifier) within the source. Note that you can also put this information in the original reference instead so it need only be stated once.",<br />
"example": "\"2\", \"34–38\", \"inside cover\"",<br />
"type": "content",<br />
"suggested": true<br />
},<br />
"q1": {<br />
"aliases": [<br />
"quote",<br />
"q",<br />
"quote1"<br />
],<br />
"label": "Quote: reference 1",<br />
"description": "A quote from the source. Appears when hovering over the page number, so the page number must be specified.",<br />
"type": "string",<br />
"suggested": true<br />
},<br />
"page2": {<br />
"aliases": [<br />
"p2",<br />
"pages2",<br />
"pp2"<br />
],<br />
"label": "Pages number(s): reference 2",<br />
"description": "Adds a page number (or other location identifier) within the source. Note that you can also put this information in the original reference instead so it need only be stated once.",<br />
"example": "\"2\", \"34–38\", \"inside cover\"",<br />
"type": "content"<br />
},<br />
"q2": {<br />
"aliases": [<br />
"quote2"<br />
],<br />
"label": "Quote: reference 2",<br />
"description": "A quote from the source. Appears when hovering over the page number, so the page number must be specified.",<br />
"type": "string"<br />
},<br />
"page3": {<br />
"aliases": [<br />
"p3",<br />
"pages3",<br />
"pp3"<br />
],<br />
"label": "Pages number(s): reference 3",<br />
"description": "Adds a page number (or other location identifier) within the source. Note that you can also put this information in the original reference instead so it need only be stated once.",<br />
"example": "\"2\", \"34–38\", \"inside cover\"",<br />
"type": "content"<br />
},<br />
"q3": {<br />
"aliases": [<br />
"quote3"<br />
],<br />
"label": "Quote: reference 3",<br />
"description": "A quote from the source. Appears when hovering over the page number, so the page number must be specified.",<br />
"type": "string"<br />
},<br />
"page4": {<br />
"aliases": [<br />
"p4",<br />
"pages4",<br />
"pp4"<br />
],<br />
"label": "Pages number(s): reference 4",<br />
"description": "Adds a page number (or other location identifier) within the source. Note that you can also put this information in the original reference instead so it need only be stated once.",<br />
"example": "\"2\", \"34–38\", \"inside cover\"",<br />
"type": "content"<br />
},<br />
"q4": {<br />
"aliases": [<br />
"quote4"<br />
],<br />
"label": "Quote: reference 4",<br />
"description": "A quote from the source. Appears when hovering over the page number, so the page number must be specified.",<br />
"type": "string"<br />
},<br />
"page5": {<br />
"aliases": [<br />
"p5",<br />
"pages5",<br />
"pp5"<br />
],<br />
"label": "Pages number(s): reference 5",<br />
"description": "Adds a page number (or other location identifier) within the source. Note that you can also put this information in the original reference instead so it need only be stated once.",<br />
"example": "\"2\", \"34–38\", \"inside cover\"",<br />
"type": "content"<br />
},<br />
"q5": {<br />
"aliases": [<br />
"quote5"<br />
],<br />
"label": "Quote: reference 5",<br />
"description": "A quote from the source. Appears when hovering over the page number, so the page number must be specified.",<br />
"type": "string"<br />
},<br />
"page6": {<br />
"aliases": [<br />
"p6",<br />
"pages6",<br />
"pp6"<br />
],<br />
"label": "Pages number(s): reference 6",<br />
"description": "Adds a page number (or other location identifier) within the source. Note that you can also put this information in the original reference instead so it need only be stated once.",<br />
"example": "\"2\", \"34–38\", \"inside cover\"",<br />
"type": "content"<br />
},<br />
"q6": {<br />
"aliases": [<br />
"quote6"<br />
],<br />
"label": "Quote: reference 6",<br />
"description": "A quote from the source. Appears when hovering over the page number, so the page number must be specified.",<br />
"type": "string"<br />
},<br />
"page7": {<br />
"aliases": [<br />
"p7",<br />
"pages7",<br />
"pp7"<br />
],<br />
"label": "Pages number(s): reference 7",<br />
"description": "Adds a page number (or other location identifier) within the source. Note that you can also put this information in the original reference instead so it need only be stated once.",<br />
"example": "\"2\", \"34–38\", \"inside cover\"",<br />
"type": "content"<br />
},<br />
"q7": {<br />
"aliases": [<br />
"quote7"<br />
],<br />
"label": "Quote: reference 7",<br />
"description": "A quote from the source. Appears when hovering over the page number, so the page number must be specified.",<br />
"type": "string"<br />
},<br />
"page8": {<br />
"aliases": [<br />
"p8",<br />
"pages8",<br />
"pp8"<br />
],<br />
"label": "Pages number(s): reference 8",<br />
"description": "Adds a page number (or other location identifier) within the source. Note that you can also put this information in the original reference instead so it need only be stated once.",<br />
"example": "\"2\", \"34–38\", \"inside cover\"",<br />
"type": "content"<br />
},<br />
"q8": {<br />
"aliases": [<br />
"quote8"<br />
],<br />
"label": "Quote: reference 8",<br />
"description": "A quote from the source. Appears when hovering over the page number, so the page number must be specified.",<br />
"type": "string"<br />
},<br />
"page9": {<br />
"aliases": [<br />
"p9",<br />
"pages9",<br />
"pp9"<br />
],<br />
"label": "Pages number(s): reference 9",<br />
"description": "Adds a page number (or other location identifier) within the source. Note that you can also put this information in the original reference instead so it need only be stated once.",<br />
"example": "\"2\", \"34–38\", \"inside cover\"",<br />
"type": "content"<br />
},<br />
"q9": {<br />
"aliases": [<br />
"quote9"<br />
],<br />
"label": "Quote: reference 9",<br />
"description": "A quote from the source. Appears when hovering over the page number, so the page number must be specified.",<br />
"type": "string"<br />
}<br />
},<br />
"description": "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.",<br />
"paramOrder": [<br />
"group",<br />
"1",<br />
"page1",<br />
"q1",<br />
"2",<br />
"page2",<br />
"q2",<br />
"3",<br />
"page3",<br />
"q3",<br />
"4",<br />
"page4",<br />
"q4",<br />
"5",<br />
"page5",<br />
"q5",<br />
"6",<br />
"page6",<br />
"q6",<br />
"7",<br />
"page7",<br />
"q7",<br />
"8",<br />
"page8",<br />
"q8",<br />
"9",<br />
"page9",<br />
"q9"<br />
]<br />
}<br />
</templatedata><br />
<br />
==See also==<br />
* [[Help:List-defined references]], which provides all the specifications for using List-defined references, especially with regard to naming references and groups.<br />
* [[WP:CITESHORT|Shortened footnotes]] in [[Wikipedia:Citing sources]], which describes the most common way of citing multiple pages of the same source.<br />
* {{tl|sfn}}, a template that implements the most common way of citing multiple pages of the same source.<br />
* [[WP:CITEBUNDLE|Citation bundling]] in [[Wikipedia:Citing sources]], a recommended way of combining a list of several consecutive footnotes into a single footnote.<br />
* [[Wikipedia:Footnotes]]<br />
* [[Wikipedia:Citing sources]]<br />
<br />
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||<br />
<!-- Categories go below this line, please; interwikis go to Wikidata, thank you! --><br />
[[Category:Footnote templates]]<br />
[[Category:Inline templates]]<br />
<br />
}}</includeonly></div>ShakespeareFan00