• Home
  • Random
  • Log in
  • Settings
  • About Azupedia
  • Disclaimers
Azupedia

Template:R

  • Language
  • Watch
  • View source
Template documentation[view] [edit] [history] [purge]
この記事は、クリエイティブ・コモンズ・表示・継承ライセンス3.0のもとで公表されたウィキペディアの項目Template:Rを素材として二次利用しています。
Lua error in Module:Itemnumber at line 91: attempt to concatenate local 'qid' (a nil value).

Template:For2

This template may soon be obsolete and deprecated: m:WMDE Technical Wishes/Book referencing would make it unnecessary. This expansion of MediaWiki's built-in <ref /> syntax is already working at some wikis, but has not yet been implemented at English Wikipedia, August 2020 (2020-08)現在[update]

Contents

  • 1 Intent
  • 2 Usage
  • 3 TemplateData
  • 4 See also
  • 5 Notes

Intent

Provides a compact shorthand for <ref name="RefName" /> citation tags, simplifying syntax so cutting code clutter.[note 1]

For example:

Using <ref> For example, fact<ref name=Bal/><ref name=Bam/><ref name=Bar/> and fact.<ref name=Bas/><ref name=Bay/><ref name=Baz/>

Displays as: For example, fact[1][2][3] and fact.[4][5][6]

Instead using {{r}} For example, fact{{r|Bal|Bam|Bar}} and fact.{{r|Bas|Bay|Baz}}

Displays as: For example, fact[1][2][3] and fact.[4][5][6]

{{r}} and <ref> can coexist on the same page, and like <ref>, {{r}} can be used with or without list-defined references. In addition, a |page= or |p= parameter adds the functionality of {{rp}}:

Using {{r}} with
|p= parameter
For example, fact.{{r|RefName|p=22}}

Displays as: For example, fact.[7]:22

Usage

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

{{r|RefName|pp=100}}

{{r|RefName|page=100}}

{{r|RefName|pages=100}}

Text.[7]: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}}

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

Text.[7]:10–14

Text.[7]:3, 6

Text.[7]:§C

Text.[7]:Dust jacket

Text.[7]:para. 7

{{r|RefName|Bam|Bar}} Text.[7][2][3] Equivalent to {{r|RefName}}{{r|Bam}}{{r|Bar}} or Template:Nobr

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

Template:Nobr

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

Template:Nobr Equivalent to {{r|RefName|p=100}}{{r|Bam|p=10–14}}{{r|Bar}}{{r|Bas|p=§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 Template:Nobr

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

Text.[7]:100 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 underlined bit. Not compatible with raw apostrophe ('); use &apos; instead. Raw double quote (") works. Curved quotes are disfavored by MOS:STRAIGHT.
{{r|1=RefName|2=Bam|3=Bar|4=Bas|p1=100|p2=10–14|p4=§C|q1=Quote from 100|q4=Quote from §C}} Text.[7]: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.

The ref names may be defined within a {{reflist}} (as illustrated below) or (in the more usual way) scattered throughout the article text using e.g. Template:Nobr or Template:Nobr.

===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
  1. ↑ 1.0 1.1 Bal reference text.
  2. ↑ 2.0 2.1 2.2 2.3 Bam reference text.
  3. ↑ 3.0 3.1 3.2 3.3 Bar reference text.
  4. ↑ 4.0 4.1 4.2 Bas reference text.
  5. ↑ 5.0 5.1 Bay reference text.
  6. ↑ 6.0 6.1 Baz reference text.
  7. ↑ 7.00 7.01 7.02 7.03 7.04 7.05 7.06 7.07 7.08 7.09 7.10 Reference text.
Notes
  1. ↑ 1.0 1.1 1.2 Note text.
  2. ↑ Cam note text.

TemplateData

  1. 転送 Template:TemplateData header

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.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Reference groupgroup g grp

The reference group of all the references displayed; see WP:REFGROUP for help.

Default
Defaults to not being in a group.
Stringsuggested
Reference name 11

If this is "RefName", the template displays <ref name="RefName"/>.

Stringrequired
Pages number(s): reference 1page1 p page pages pp p1 pages1 pp1

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.

Example
"2", "34–38", "inside cover"
Contentsuggested
Quote: reference 1q1 quote q quote1

A quote from the source. Appears when hovering over the page number, so the page number must be specified.

Stringsuggested
Reference name 22

If this is "RefName", the template displays <ref name="RefName"/>.

Stringsuggested
Pages number(s): reference 2page2 p2 pages2 pp2

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.

Example
"2", "34–38", "inside cover"
Contentoptional
Quote: reference 2q2 quote2

A quote from the source. Appears when hovering over the page number, so the page number must be specified.

Stringoptional
Reference name 33

If this is "RefName", the template displays <ref name="RefName"/>.

Stringsuggested
Pages number(s): reference 3page3 p3 pages3 pp3

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.

Example
"2", "34–38", "inside cover"
Contentoptional
Quote: reference 3q3 quote3

A quote from the source. Appears when hovering over the page number, so the page number must be specified.

Stringoptional
Reference name 44

If this is "RefName", the template displays <ref name="RefName"/>.

Stringoptional
Pages number(s): reference 4page4 p4 pages4 pp4

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.

Example
"2", "34–38", "inside cover"
Contentoptional
Quote: reference 4q4 quote4

A quote from the source. Appears when hovering over the page number, so the page number must be specified.

Stringoptional
Reference name 55

If this is "RefName", the template displays <ref name="RefName"/>.

Stringoptional
Pages number(s): reference 5page5 p5 pages5 pp5

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.

Example
"2", "34–38", "inside cover"
Contentoptional
Quote: reference 5q5 quote5

A quote from the source. Appears when hovering over the page number, so the page number must be specified.

Stringoptional
Reference name 66

If this is "RefName", the template displays <ref name="RefName"/>.

Stringoptional
Pages number(s): reference 6page6 p6 pages6 pp6

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.

Example
"2", "34–38", "inside cover"
Contentoptional
Quote: reference 6q6 quote6

A quote from the source. Appears when hovering over the page number, so the page number must be specified.

Stringoptional
Reference name 77

If this is "RefName", the template displays <ref name="RefName"/>.

Stringoptional
Pages number(s): reference 7page7 p7 pages7 pp7

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.

Example
"2", "34–38", "inside cover"
Contentoptional
Quote: reference 7q7 quote7

A quote from the source. Appears when hovering over the page number, so the page number must be specified.

Stringoptional
Reference name 88

If this is "RefName", the template displays <ref name="RefName"/>.

Stringoptional
Pages number(s): reference 8page8 p8 pages8 pp8

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.

Example
"2", "34–38", "inside cover"
Contentoptional
Quote: reference 8q8 quote8

A quote from the source. Appears when hovering over the page number, so the page number must be specified.

Stringoptional
Reference name 99

If this is "RefName", the template displays <ref name="RefName"/>.

Stringoptional
Pages number(s): reference 9page9 p9 pages9 pp9

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.

Example
"2", "34–38", "inside cover"
Contentoptional
Quote: reference 9q9 quote9

A quote from the source. Appears when hovering over the page number, so the page number must be specified.

Stringoptional

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

Notes

  1. ↑ Here we also add alliteration.
The above documentation is transcluded from Template:R/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://wiki.tiffa.net/w/index.php?title=Template:R&oldid=724"
Last edited on 31 January 2021, at 21:06

Languages

      This page is not available in other languages.

      Azupedia
      • This page was last edited on 31 January 2021, at 21:06.
      • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
      • Privacy policy
      • About Azupedia
      • Disclaimers
      • Desktop