Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Template:R/testcases

From Wikipedia, the free encyclopedia
Usage Display Notes
{{R/sandbox|SandboxRefName}} Text.[1] Equivalent to <ref name="SandboxRefName" />.
{{R/sandbox|SandboxRefName|p=100}}

{{R/sandbox|SandboxRefName|page=100}}

{{R/sandbox|SandboxRefName|page=[[Hundred|100]]}}

{{R/sandbox|SandboxRefName|page=[https://books.google.com/books?id=S3JHAAAAYAAJ&pg=PA15 15]}}

{{R/sandbox|SandboxRefName|pp=100, 102}}

{{R/sandbox|SandboxRefName|pages=100, 102}}

Text.[1]: 100 

Text.[1]: 100 

Text.[1]: 100 

Text.[1]: 15 

Text.[1]: 100, 102 

Text.[1]: 100, 102 

Adds a page number (or other location identifier) within the source.

Use |p= or |page= for singular pages, |pp= or |pages= for plural pages, and |at= or |loc= for other in-source-locations.

If the article cites only one location in a given source, reduce clutter by coding simply {{R/sandbox|SandboxRefName}}and integrating the location into the main SandboxRefName citation.

{{R/sandbox|SandboxRefName|pages=10&ndash;14}}(endash)

{{R/sandbox|SandboxRefName|pages=10-14}}(hyphen)

{{R/sandbox|SandboxRefName|pages=2-14&ndash;2-16}}(hyphens and endash)

{{R/sandbox|SandboxRefName|pages=2-14-2-16}}(hyphens)

{{R/sandbox|SandboxRefName|pages=((2-14)), ((2-16))}}(hyphens)

{{R/sandbox|SandboxRefName|pp=3, 6}}

{{R/sandbox|SandboxRefName|at=&sect;C}}

{{R/sandbox|SandboxRefName|at=Dust jacket}}

{{R/sandbox|SandboxRefName|at=para. 7}}

Text.[1]: 10–14 

Text.[1]: 10–14 

Text.[1]: 2-14–2-16 

Text.[1]: 2-14–2-16 

Text.[1]: 2-14, 2-16 

Text.[1]: 3, 6 

Text.[1]: §C 

Text.[1]: Dust jacket 

Text.[1]: para. 7 

{{R/sandbox|SandboxRefName|Bam|Bar}} Text.[1][2][3] Equivalent to {{R/sandbox|SandboxRefName}}{{R/sandbox|Bam}}{{R/sandbox|Bar}}or <ref name=SandboxRefName/><ref name=Bam/><ref name=Bar/>.

Up to nine references may be "bundled" this way.

{{R/sandbox|1=SandboxRefName|2=Bam|3=Bar|4=Bas|p1=100|pp2=10&ndash;14|at4=&sect;C}}

{{R/sandbox|1=SandboxRefName|p1=100|2=Bam|pp2=10&ndash;14|3=Bar|4=Bas|at4=&sect;C}}

{{R/sandbox|n1=SandboxRefName|p1=100|n2=Bam|pp2=10&ndash;14|n3=Bar|n4=Bas|at4=&sect;C}}

{{R/sandbox |name1=SandboxRefName |page1=100 |name2=Bam |pages2=10&ndash;14 |name3=Bar |name4=Bas |at4=&sect;C}}

Text.[1]: 100 [2]: 10–14 [3][4]: §C  Equivalent to {{R/sandbox|SandboxRefName|p=100}}{{R/sandbox|Bam|pp=10&ndash;14}}{{R/sandbox|Bar}}{{R/sandbox|Bas|at=&sect;C}}.

In the example, not all references have pages; make sure that e.g. |1= matches |p1=

{{R/sandbox|group=Notes|NtName}}

{{R/sandbox|grp=Notes|NtName|NtCam}}

{{R/sandbox|g=Notes|NtName|p=13}}

Text.[Notes 1]

Text.[Notes 1][Notes 2]

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/sandbox|SandboxRefName|p=100|q=quote from the text}}

{{R/sandbox|SandboxRefName|p=100|quote=quote from the text}}

{{R/sandbox|SandboxRefName|p=100|quote-page=100|quote=quote from the text}}

{{R/sandbox|SandboxRefName|p=100|quote-page=p|quote=quote from the text}}

{{R/sandbox|SandboxRefName|pp=100-102|quote-page=101|quote=quote from page 101}}

{{R/sandbox|SandboxRefName|p=101|q=Palabras en español|language=Spanish}}

{{R/sandbox|SandboxRefName|p=123|q=Citation de la page 123|language=french|translation=Quote from page 123}}

Text.[1]: 100 

Text cited to a range of pages with a quote from a specific page.[1]: 100–102 

Text with a foreign-language quote supporting it.[1]: 101 

Text with a foreign-language quote and translation supporting it.[1]: 123 

Makes sense only if |p= (or one of its synonyms) is present. |quote= (or |q=) underlines the superscript page number/location identifier, signaling availability of a quote from the source, which pops up when the mouse is hovered over the dashed underlined bit. |quote-page= or |quote-pages= can be used to optionally specify a specific page or number of pages for the quote only. If this number is the same as what's defined through |p= or |pp=, the special symbolic tokens "p" and "pp" can be used instead of an actual page number. Curved quotes are disfavored by MOS:STRAIGHT.
{{R/sandbox|1=SandboxRefName|2=Bam|3=Bar|4=Bas|p1=100|pp2=10&ndash;14|at4=&sect;C|q1=Quote from 100|q4=Quote from &sect;C}}

{{R/sandbox|n1=SandboxRefName|n2=Bam|n3=Bar|n4=Bas|p1=100|pp2=10&ndash;14|at4=&sect;C|q1=Quote from 100|q4=Quote from &sect;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.
{{R/sandbox |n=SandboxRefName2 |p=201 |r=Harold Smith (1989). ''Proper Referencing''. Atlanta Press. p. 105, 201.}}

{{R/sandbox |n=SandboxRefName3 |r={{cite book |author-first=Harold |author-last=Smith |date=2020 |edition=2nd |title=Proper Referencing |publisher=Atlanta Press |pages=321, 356}} }}

{{R/sandbox |g=Notes |n=SandboxNestedNote |r=This example shows how to nest footnotes.{{R/sandbox |n=SandboxRefName2 |p=105}}}}

More[5]: 201 [6]: 321  good[6]: 356  prose.[Notes 3] Examples of inline definitions and nested footnotes.
{{R/sandbox |n=SandboxRefName4 |r=Citation A.}}

{{R/sandbox |n=SandboxRefName4 |a=Citation B.}}

{{R/sandbox |n=SandboxRefName5 |r=Citation C.}}

{{R/sandbox |n=SandboxRefName5 |p=102 |a=Note for page 102.}}

{{R/sandbox |n=SandboxRefName5 |p=342 |a=Note for page 342.}}

{{R/sandbox |n=SandboxRefName5 |p=346 |qp=p |q=Quote from page 346 |a=q}}

Two[7] citations[7][7] bundled into one entry, or one citation[8] with accumulated[8][8]: 102  commentary[8][8]: 342 [8][8]: 346  from shortened references. Examples of annotation. If the annotation should be the page number defined through |p= or what would be shown as quote in the tooltip, the special symbolic tokens "p" and "q" can be used with |annotation= in order to avoid having to repeat this contents.
{{R/sandbox |n=SandboxRefName6 |r=Citation D.}}

{{R/sandbox |n=SandboxRefName6 |p=102 |a=:p. 102: Note for page 102.}}

{{R/sandbox |n=SandboxRefName6 |p=342 |a=:p. 342: Note for page 342.}}

{{R/sandbox |n=SandboxRefName6 |p=346 |qp=p |q=Quote from page 346 |a=q |leadin=:p.&amp;nbsp;}}

A citation[9] with accumulated[9][9]: 102  commentary[9][9]: 342 [9][9]: 346  using indentation in reference section and tooltip view. Indentation in annotations. It can be achieved by adding : colons. If it is using for the quote parameter |q=, it can be achieved by using |leadin=.
{{R/sandbox |n=SandboxRefName7 |r=Citation E. |s=Context7}}

{{R/sandbox |n=SandboxRefName7 |p=10 |q=Quote E |a=q |s=Context7}}

Context sections of the article supported by the reference can be defined through {{section}} (or other means, see: LST). The three parts of section "Context7" in this example[10] are shown underlined for illustration purposes.[10][10]: 10  {{R}} will display its "context" as "dotted underline" tooltip (to be distinguished from the "dashed underline" tooltip further up) when hovering the mouse over the reference link. Multiple sections of the same name will be shown merged (without separator, hence include some delimiter like space into the sections). Note the special syntax used to define sections (with empty |begin= and |end= attributes). Keep the size of the selected sections reasonably short and do not forget to define the end of a section. When no name was specified, names are build following this scheme for context sections: "cite_sect-group-name-pagelocation" (where group, name, page (either page or pages) and location refer to the corresponding template parameters and can be empty if omitted).


Usage Display Notes
{{r|RefName}} Text.[11] Equivalent to <ref name="RefName" />.
{{r|RefName|p=100}}

{{r|RefName|page=100}}

{{r|RefName|page=[[Hundred|100]]}}

{{r|RefName|page=[https://books.google.com/books?id=S3JHAAAAYAAJ&pg=PA15 15]}}

{{r|RefName|pp=100, 102}}

{{r|RefName|pages=100, 102}}

Text.[11]: 100 

Text.[11]: 100 

Text.[11]: 100 

Text.[11]: 15 

Text.[11]: 100, 102 

Text.[11]: 100, 102 

Adds a page number (or other location identifier) within the source.

Use |p= or |page= for singular pages, |pp= or |pages= for plural pages, and |at= or |loc= for other in-source-locations.

If the article cites only one location in a given source, reduce clutter by coding simply {{r|RefName}}and integrating the location into the main RefName citation.

{{r|RefName|pages=10&ndash;14}}(endash)

{{r|RefName|pages=10-14}}(hyphen)

{{r|RefName|pages=2-14&ndash;2-16}}(hyphens and endash)

{{r|RefName|pages=2-14-2-16}}(hyphens)

{{r|RefName|pages=((2-14)), ((2-16))}}(hyphens)

{{r|RefName|pp=3, 6}}

{{r|RefName|at=&sect;C}}

{{r|RefName|at=Dust jacket}}

{{r|RefName|at=para. 7}}

Text.[11]: 10–14 

Text.[11]: 10–14 

Text.[11]: 2-14–2-16 

Text.[11]: 2-14–2-16 

Text.[11]: 2-14, 2-16 

Text.[11]: 3, 6 

Text.[11]: §C 

Text.[11]: Dust jacket 

Text.[11]: para. 7 

{{r|RefName|Bam|Bar}} Text.[11][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|pp2=10&ndash;14|at4=&sect;C}}

{{r|1=RefName|p1=100|2=Bam|pp2=10&ndash;14|3=Bar|4=Bas|at4=&sect;C}}

{{r|n1=RefName|p1=100|n2=Bam|pp2=10&ndash;14|n3=Bar|n4=Bas|at4=&sect;C}}

{{r |name1=RefName |page1=100 |name2=Bam |pages2=10&ndash;14 |name3=Bar |name4=Bas |at4=&sect;C}}

Text.[11]: 100 [2]: 10–14 [3][4]: §C  Equivalent to {{r|RefName|p=100}}{{r|Bam|pp=10&ndash;14}}{{r|Bar}}{{r|Bas|at=&sect;C}}.

In the example, not all references have pages; make sure that e.g. |1= matches |p1=

{{r|group=Notes|NtName}}

{{r|grp=Notes|NtName|NtCam}}

{{r|g=Notes|NtName|p=13}}

Text.[Notes 1]

Text.[Notes 1][Notes 2]

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}}

{{r|RefName|p=100|quote=quote from the text}}

{{r|RefName|p=100|quote-page=100|quote=quote from the text}}

{{r|RefName|p=100|quote-page=p|quote=quote from the text}}

{{r|RefName|pp=100-102|quote-page=101|quote=quote from page 101}}

{{r|RefName|p=101|q=Palabras en español|language=Spanish}}

{{r|RefName|p=123|q=Citation de la page 123|language=french|translation=Quote from page 123}}

Text.[11]: 100 

Text cited to a range of pages with a quote from a specific page.[11]: 100–102 

Text with a foreign-language quote supporting it.[11]: 101 

Text with a foreign-language quote and translation supporting it.[11]: 123 

Makes sense only if |p= (or one of its synonyms) is present. |quote= (or |q=) underlines the superscript page number/location identifier, signaling availability of a quote from the source, which pops up when the mouse is hovered over the dashed underlined bit. |quote-page= or |quote-pages= can be used to optionally specify a specific page or number of pages for the quote only. If this number is the same as what's defined through |p= or |pp=, the special symbolic tokens "p" and "pp" can be used instead of an actual page number. Curved quotes are disfavored by MOS:STRAIGHT.
{{r|1=RefName|2=Bam|3=Bar|4=Bas|p1=100|pp2=10&ndash;14|at4=&sect;C|q1=Quote from 100|q4=Quote from &sect;C}}

{{r|n1=RefName|n2=Bam|n3=Bar|n4=Bas|p1=100|pp2=10&ndash;14|at4=&sect;C|q1=Quote from 100|q4=Quote from &sect;C}}

Text.[11]: 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.
{{r |n=RefName2 |p=201 |r=Harold Smith (1989). ''Proper Referencing''. Atlanta Press. p. 105, 201.}}

{{r |n=RefName3 |r={{cite book |author-first=Harold |author-last=Smith |date=2020 |edition=2nd |title=Proper Referencing |publisher=Atlanta Press |pages=321, 356}} }}

{{r |g=Notes |n=NestedNote |r=This example shows how to nest footnotes.{{r |n=RefName2 |p=105}}}}

More[12]: 201 [13]: 321  good[13]: 356  prose.[Notes 4] Examples of inline definitions and nested footnotes.
{{r |n=RefName4 |r=Citation A.}}

{{r |n=RefName4 |a=Citation B.}}

{{r |n=RefName5 |r=Citation C.}}

{{r |n=RefName5 |p=102 |a=Note for page 102.}}

{{r |n=RefName5 |p=342 |a=Note for page 342.}}

{{r |n=RefName5 |p=346 |qp=p |q=Quote from page 346 |a=q}}

Two[14] citations[14][14] bundled into one entry, or one citation[15] with accumulated[15][15]: 102  commentary[15][15]: 342 [15][15]: 346  from shortened references. Examples of annotation. If the annotation should be the page number defined through |p= or what would be shown as quote in the tooltip, the special symbolic tokens "p" and "q" can be used with |annotation= in order to avoid having to repeat this contents.
{{r |n=RefName6 |r=Citation D.}}

{{r |n=RefName6 |p=102 |a=:p. 102: Note for page 102.}}

{{r |n=RefName6 |p=342 |a=:p. 342: Note for page 342.}}

{{r |n=RefName6 |p=346 |qp=p |q=Quote from page 346 |a=q |leadin=:p.&amp;nbsp;}}

A citation[16] with accumulated[16][16]: 102  commentary[16][16]: 342 [16][16]: 346  using indentation in reference section and tooltip view. Indentation in annotations. It can be achieved by adding : colons. If it is using for the quote parameter |q=, it can be achieved by using |leadin=.
{{r |n=RefName7 |r=Citation E. |s=Context7}}

{{r |n=RefName7 |p=10 |q=Quote E |a=q |s=Context7}}

Context sections of the article supported by the reference can be defined through {{section}} (or other means, see: LST). The three parts of section "Context7" in this example[17] are shown underlined for illustration purposes.[17][17]: 10  {{R}} will display its "context" as "dotted underline" tooltip (to be distinguished from the "dashed underline" tooltip further up) when hovering the mouse over the reference link. Multiple sections of the same name will be shown merged (without separator, hence include some delimiter like space into the sections). Note the special syntax used to define sections (with empty |begin= and |end= attributes). Keep the size of the selected sections reasonably short and do not forget to define the end of a section. When no name was specified, names are build following this scheme for context sections: "cite_sect-group-name-pagelocation" (where group, name, page (either page or pages) and location refer to the corresponding template parameters and can be empty if omitted).

Test cases using testcase template

[edit]
{{R|Rashke|p=[[Category:Templates needing substitution checking]]<sup class="noprint Inline-Template " style="white-space:nowrap;">&#91;<i>[[Wikipedia:Citing sources|<span title="This citation requires a reference to the specific page or range of pages in which the material appears.&#32;(February 2012)">page&nbsp;needed</span>]]</i>&#93;</sup>}}
  • {{R|Rashke|p=[[Category:Templates needing substitution checking]]<sup class="noprint Inline-Template " style="white-space:nowrap;">&amp;#91;<i>[[Wikipedia:Citing sources|<span title="This citation requires a reference to the specific page or range of pages in which the material appears.&amp;#32;(February 2012)">page&amp;nbsp;needed</span>]]</i>&amp;#93;</sup>}} → [18]: [page needed] 
  • {{R/sandbox|Rashke|p=[[Category:Templates needing substitution checking]]<sup class="noprint Inline-Template " style="white-space:nowrap;">&amp;#91;<i>[[Wikipedia:Citing sources|<span title="This citation requires a reference to the specific page or range of pages in which the material appears.&amp;#32;(February 2012)">page&amp;nbsp;needed</span>]]</i>&amp;#93;</sup>}} → [18]: [page needed] 

References

[edit]

References

[edit]
  1. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Sandbox Reference text.
  2. 1 2 3 4 5 6 Bam reference text.
  3. 1 2 3 4 5 6 Bar reference text.
  4. 1 2 3 4 Bas reference text.
  5. 1 2 Harold Smith (1989). Proper Referencing. Atlanta Press. pp. 105, 201.
  6. 1 2 Smith, Harold (2020). Proper Referencing (2nd ed.). Atlanta Press. pp. 321, 356.
  7. 1 2 Citation A. Citation B.
  8. 1 2 3 4 Citation C. Note for page 102. Note for page 342. ‌346: Quote from page 346
  9. 1 2 3 4 Citation D.
    p. 102: Note for page 102.
    p. 342: Note for page 342.
    ‌:p. 346: Quote from page 346
  10. 1 2 Citation E. ‌: Quote E
  11. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Reference text.
  12. 1 2 Harold Smith (1989). Proper Referencing. Atlanta Press. pp. 105, 201.
  13. 1 2 Smith, Harold (2020). Proper Referencing (2nd ed.). Atlanta Press. pp. 321, 356.
  14. 1 2 Citation A. Citation B.
  15. 1 2 3 4 Citation C. Note for page 102. Note for page 342. ‌346: Quote from page 346
  16. 1 2 3 4 Citation D.
    p. 102: Note for page 102.
    p. 342: Note for page 342.
    ‌
    p. 346: Quote from page 346
  17. 1 2 Citation E. ‌Quote E
  18. 1 2 Cite error: The named reference Rashke was invoked but never defined (see the help page).

Notes

[edit]
  1. 1 2 3 4 5 6 Note text.
  2. 1 2 Cam note text.
  3. ↑ This example shows how to nest footnotes.[5]: 105 
  4. ↑ This example shows how to nest footnotes.[12]: 105