• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Beta Wikipedia

Template:R

  • Template
  • Discussion
  • Language
  • Watch
  • Edit
Template documentation[view] [edit] [history] [purge]
For redirect templates, see Template:R template index.

Contents

  • 1 Usage
  • 2 Examples
    • 2.1 Comparison to <ref>
    • 2.2 Pages
  • 3 See also

Usage

edit

Provides a simple wrapper for (up to 9 consecutive) <ref name="foo" /> citation tags that minimizes visual impact on the text, which along with the simpler syntax increases code readability and editability. For example:

usage notes
{{r|ref_name}} Adds a reference like foo[1], equivalent to <ref name="ref_name" />. This can be combined, like {{r|ref_name|another|more|ref4}} (equivalent to <ref name="ref_name" /><ref name="another" /><ref name="more" /><ref name="ref4" />).
{{r|ref_name|group=bar}} Adds a reference like foo[bar 1] for a reference in the bar group (for pages with multiple reference sections). The group applies to all references in the {{r}} call.
{{r|ref_name|page1=100}} Adds a reference like foo[1]: 100 , with a page number (page1 applies to the first reference, page2 to the second, etc.). This is only needed for multiple references to different pages in the source.
  1. ^  

Examples

edit

Comparison to <ref>

edit
unwrapped For example, fact<ref name="bacelieri" /><ref name="cochrane2006" /><ref name="emed_hpv" /> and fact.<ref name="emed_plantar" /><ref name="hipusa" /><ref name="kunnamo" />
wrapped with {{r}} For example, fact.{{r|bacelieri|cochrane2006|emed_hpv}} and fact{{r|emed_plantar|hipusa|kunnamo}}

Pages

edit

By passing page numbers to the parameters page1 through page9, this template will add a superscripted page number to the reference. Using the code {{r|ref_name|bar|baz|page1=20|page3=5–12}}, one can generate references like these.[1]: 20 [2][3]: 5–12  The ref names must be defined, normally in a references section (as demonstrated below):

{{reflist|refs=
<ref name="ref_name">Foo.</ref>
<ref name="bar">Bar.</ref>
<ref name="baz">Baz.</ref>
}}

Resulting in:

  1. ^ a b c Foo.
  2. ^ Bar.
  3. ^ Baz.

See also

edit
  • 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
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://en.wikipedia.beta.wmcloud.org/w/index.php?title=Template:R&oldid=624718"
Last edited on 25 September 2021, at 21:49

Languages

    • فارسی
    • 한국어
    • 日本語
    • Polski
    • 中文
    Beta Wikipedia
    • Wikimedia Foundation
    • Powered by MediaWiki
    • This page was last edited 21:49, 25 September 2021 by Beta Wikipedia anonymous user Imported>Matthiaspaul. Based on work by Beta Wikipedia users Mvolz, Jdforrester (WMF) and Gadget850 and Beta Wikipedia anonymous users imported>Matthiaspaul, imported>EEng, imported>Admin, imported>AGK, imported>ScottMHoward, 76.185.215.32, imported>Courcelles, imported>Ucucha, imported>Philcha, imported>SlimVirgin, 81.111.114.131, imported>Mono, imported>Euryalus, imported>Pathoschild and imported>TheFeds.
    • Content is available under CC BY-SA 4.0 unless otherwise noted.
    • Privacy policy
    • About Wikipedia
    • Disclaimers
    • Contact Wikipedia
    • Code of Conduct
    • Developers
    • Statistics
    • Cookie statement
    • Terms of use
    • Desktop