ข้ามไปเนื้อหา

แม่แบบ:R/testcases

จากวิกิพีเดีย สารานุกรมเสรี
Usage Display Notes
{{r/sandbox|RefName}} Text.[1] Equivalent to <ref name=RefName/>.
{{r/sandbox|RefName|p=100}}

{{r/sandbox|RefName|pp=100}}

{{r/sandbox|RefName|page=100}}

{{r/sandbox|RefName|pages=100}}

Text.[1]: 100  Adds a page number (or other location identifier) within the source.

The |p=, |pp=, |page=, and |pages= parameters are equivalent.

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

{{r/sandbox|RefName|p=10–14}}

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

{{r/sandbox|RefName|page=§C}}

{{r/sandbox|RefName|pages=Dust jacket}}

Text.[1]: 10–14 

Text.[1]: 3, 6 

Text.[1]: §C 

Text.[1]: Dust jacket 

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

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

{{r/sandbox|RefName|Bam|Bar|Bas|p1=100|p2=10–14|p4=§C}}

{{r/sandbox|1=RefName|2=Bam|3=Bar|4=Bas|p1=100|p2=10–14|p4=§C}}

{{r/sandbox|1=RefName|p1=100|2=Bam|p2=10–14|3=Bar|4=Bas|p4=§C}}

Text.[1]: 100 [2]: 10–14 [3][4]: §C  Equivalent to {{r/sandbox|RefName|p=100}}{{r/sandbox|Bam}}{{r/sandbox|Bar|p=10–14}}{{r/sandbox|Bas|p=§C}}.

Multiple "bundled" citations with page numbers in a single call 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, which also demonstrate that you may group all the name parameters and page parameters, or list them sequentially.

{{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.

Location identifiers may also be used as detailed above.

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

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

Text.[1]: 100 Adds the relevant quote from the source to a pop-up when the mouse is hovered over the location identifier. Requires that a location identifier be specified. The |q= and |quote= parameters are equivalent.
{{r/sandbox|RefName|Bam|Bar|Bas|p1=100|p2=10–14|p4=§C|q1=Quote from 100|q4=Quote from §C}}

{{r/sandbox|RefName|Bam|Bar|q1=Quote without page number}}

Text.[1]: 100[3]: 10–14 [4]

Text.[1][3]

Note that not all location identifiers have quotes; use care in ensuring the corresponding |q= parameter number is listed for the correct reference.
Usage Display Notes
{{r|RefName}} Text.[1] Equivalent to <ref name=RefName/>.
{{r|RefName|p=100}}

{{r|RefName|pp=100}}

{{r|RefName|page=100}}

{{r|RefName|pages=100}}

Text.[1]: 100  Adds a page number (or other location identifier) within the source.

The |p=, |pp=, |page=, and |pages= parameters are equivalent.

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|p=10–14}}

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

{{r|RefName|page=§C}}

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

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

{{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.[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 |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, which also demonstrate 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 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.

Location identifiers may also be used as detailed above.

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

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

Text.[1]: 100 Adds the relevant quote from the source to a pop-up when the mouse is hovered over the location identifier. Requires that a location identifier be specified. The |q= and |quote= parameters are equivalent.
{{r|RefName|Bam|Bar|Bas|p1=100|p2=10–14|p4=§C|q1=Quote from 100|q4=Quote from §C}}

{{r|RefName|Bar|q1=Quote without page number}}

Text.[1]: 100[2]: 10–14 [3][4]: §C

Text.[1][3]

Note that not all location identifiers have quotes; use care in ensuring the corresponding |q= parameter number is listed for the correct reference.

Test cases using testcase template

[แก้]
{{R|Rashke|p=[[Category:Templates needing substitution checking]]<sup class="noprint Inline-Template " style="white-space:nowrap;">&#91;<i>[[วิกิพีเดีย:การอ้างอิงแหล่งที่มา|<span title="ต้องการอ้างอิงไปยังเลขหน้าโดยเฉพาะหรือพิสัยเลขหน้าจากแหล่งอ้างอิง&#32;(February 2012)">ต้องการเลขหน้า</span>]]</i>&#93;</sup>}}
  • {{R|Rashke|p=[[Category:Templates needing substitution checking]]<sup class="noprint Inline-Template " style="white-space:nowrap;">&#91;<i>[[วิกิพีเดีย:การอ้างอิงแหล่งที่มา|<span title="ต้องการอ้างอิงไปยังเลขหน้าโดยเฉพาะหรือพิสัยเลขหน้าจากแหล่งอ้างอิง&#32;(February 2012)">ต้องการเลขหน้า</span>]]</i>&#93;</sup>}}[5]: [ต้องการเลขหน้า]
  • {{R/sandbox|Rashke|p=[[Category:Templates needing substitution checking]]<sup class="noprint Inline-Template " style="white-space:nowrap;">&#91;<i>[[วิกิพีเดีย:การอ้างอิงแหล่งที่มา|<span title="ต้องการอ้างอิงไปยังเลขหน้าโดยเฉพาะหรือพิสัยเลขหน้าจากแหล่งอ้างอิง&#32;(February 2012)">ต้องการเลขหน้า</span>]]</i>&#93;</sup>}}[5]: [ต้องการเลขหน้า]

References

[แก้]

References

[แก้]
  1. 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 Reference text.
  2. 2.0 2.1 2.2 2.3 2.4 Bam reference text.
  3. 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 Bar reference text.
  4. 4.0 4.1 4.2 4.3 Bas reference text.
  5. 5.0 5.1 อ้างอิงผิดพลาด: ป้ายระบุ <ref> ไม่ถูกต้อง ไม่มีการกำหนดข้อความสำหรับอ้างอิงชื่อ Rashke

Notes

[แก้]
  1. 1.0 1.1 1.2 1.3 1.4 1.5 Note text.
  2. 2.0 2.1 Cam note text.