Template:Rp/doc
{{#ifeq:doc|{{#ifeq:|override|doc|doc}}|{{Documentation subpage/{{#ifexist: Template:Documentation subpage/{{#if: |{{{2}}}|⧼Lang⧽}} | {{#if: |{{{2}}}|⧼Lang⧽}} | {{#ifexist: Template:Documentation subpage/Template:GetFallback | Template:GetFallback | {{#ifexist: Template:Documentation subpage/Template:GetFallback2 | Template:GetFallback2 | en }} }} }}}}}}
Function
Use this template when you are referring to specific pages within a cited source many times in the same article. The following example sentence shows the formatting produced by
<ref name="aardvark">
... details of cited source ...</ref>{{rp|23}}
which would be used to refer to a fact on page 23 of reference [1]:
- Apples should be eaten when they are ripe.<ref name="aardvark">A. A. Aardvark (1999). The Best Moments for Eating. Green Press.</ref>{{#if:
|Template:Page needed |{{#if:
|{{#if: |(|(p}}{{{page}}}) |{{ #if: |{{#if: |(|(pp}}{{{pages}}}) |{{ #if: |({{{at}}}) |:23 }} }} }}
}} This second example sentence shows the formatting produced by
<ref name="aardvark" />{{rp|56}}
which would be used as citation for a statement supported by a fact on page 56 of the same reference [1], which will appear only once in the list of references:
- Porridge, usually eaten for breakfast, can also serve as a dessert.<ref name="aardvark" />{{#if:
|Template:Page needed |{{#if:
|{{#if: |(|(p}}{{{page}}}) |{{ #if: |{{#if: |(|(pp}}{{{pages}}}) |{{ #if: |({{{at}}}) |:56 }} }} }}
}}
Usage
With colon
{{{{#if:rp | rp | tlx|... }}{{#ifeq:page number(s)|page number(s)| |page number(s) }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#if:| |... }}}}
"Page number(s)" can be a single page number (287), several (xii, 287, 292, 418) or a range (287–88) or any combination thereof. Do not add "Page", "pp.", etc.Template:Mdash just the numbers. Of course, it can also be used for non-numeric pages, for example: "f. 29", "A7", and "back cover", etc., and can also be used for non-paginated sources, e.g., "0:35:12" for a video source.
This template (the name of which stands for "reference pages") is for appending page numbers in Harvard referencing style (or AMA style, as an option – see "With parentheses", below) to Cite.php-generated inline reference citations. It is a solution for the problem of an article with a source that must be cited many, many times, at numerous different pages. It is an alternative to the more common method of using shortened footnotes, that does not require the reader to follow two links to see the source. The Cite.php <ref ...>
footnoting system is desired to be used instead of the incredibly tedious and easy-to-break {{ref label}} and {{note label}} system (tedious and fragile in this context; the templates are not terribly difficult to use and are quite useful in other situations).
The problem of course is that a work cited 100+ times with page numbers in each appearance, with individual <ref ...>
's will result in more than 100 lines generated for the same source by <references />
(or {{Reflist}}),[*note] while using a single <ref ...>...</ref>
and followup <ref ... />
's with the same name=
and simply mentioning all of the pages cited, in the single line generated by <references />
could result in at least 100 pages being specifically cited in a single reference citation footnote, rendering it basically unreadable and certainly useless. Given that Featured Article and sometimes even Good Article review generally insist upon specific facts being cited with specific page numbers, Cite.php's limitations are in fact a severe problem for editors. Even more importantly, either of the two results above is a severe problem for encyclopedia readers.
This template solves this problem (perhaps temporarily, as Cite.php may be upgraded at some future date to account for this problem, in which case a bot can be created to convert {{Rp}} instances to the new, improved "Super-<ref ...>
").
- * Note: See this diff for a short but already reader-annoying example. Imagine it with 100+ citations to one source instead of just 13.
Example
The example below shows {{Rp}} in use both at a first occurrence [<ref ...>...</ref>
], with other references and inline superscript templates present so one can see how it looks when used in series, and at a later [<ref ... />
] occurrence.
- Code
An asserted fact.{{Clarifyme|date=November 2024}}<ref name="Jackson1999">{{Cite book
|last=Jackson
|first=Jennifer
|title=The Unlightable Being of Bareness
|publisher=Funky Publications|location=[[San Francisco, CA]]
|year=1999
|isbn=1-2345-6789-0
}}</ref>{{rp|233–7}}<ref name="Smith2000">{{Cite book
|last=Smith
|first=Bob
|title=Another Source
|publisher=Another Publisher
|location=[[Chicago, IL]]
|year=2000
|isbn=0-0986-5432-1
|page=27
}}</ref><ref name="NYT20060120">{{Cite news
|url= http://url.goes.here.tld/
|title=Some Article
|last=Jones
|first=Bill
|work=New York Times
|page=S4, "Style" section
|publisher=[[New York Times Company]]
|location=[[New York, NY]]
|date=January 20, 2006
|accessdate=2007-03-17
}}</ref>
...
Another asserted fact.<ref name="Jackson1999" />{{rp|27, 422}}
...
{{Reflist}}
- Results
An asserted fact.[clarify]<ref name="Jackson1999"></ref>{{#if: |Template:Page needed |{{#if:
|{{#if: |(|(p}}{{{page}}}) |{{ #if: |{{#if: |(|(pp}}{{{pages}}}) |{{ #if: |({{{at}}}) |:233–7 }} }} }}
}}<ref name="Smith2000"></ref><ref name="NYT20060120">{{#if:Jones
|{{#if: |[[{{{authorlink}}}|{{#if: Jones |Jones{{#if: Bill |, Bill }} |{{{author}}} }}]] |{{#if:Jones |Jones{{#if: Bill |, Bill }} |{{{author}}} }} }}
}}{{#if:Jones
|{{#if: |; {{{coauthors}}} }}
}}{{#if:January 20, 2006
| (January 20, 2006)
|{{#if:
|{{#if:
| ({{{month}}} {{{year}}})
| ({{{year}}})
}}
}}
}}{{#if:JonesJanuary 20, 2006
|.
}}{{#if:Some Article|{{#ifeq:|on|“|"}}{{#if:
|Some Article |{{#if:http://url.goes.here.tld/ |{{#if: |[{{{archiveurl}}} Some Article] |Some Article }} |Some Article }}
}}{{#ifeq:|on|”|"}}{{#if:
| ({{{format}}})
}}.}} {{#if:New York Times
|{{#if:New York Times|New York Times|{{{journal}}}}} |Error: journal= not stated
}}{{#if:
| {{{volume}}}
}}{{#if:
| ({{{issue}}})
}}{{#if:S4, "Style" section
|: S4, "Style" section
}}{{#if:New York Times Company
|. {{#if:New York, NY |New York, NY: }}New York Times Company
}}{{#if:
|. DOI:{{{doi}}}
}}{{#if:
|. PMID {{{pmid}}}
}}{{#if:
| {{#if:http://url.goes.here.tld/ |. PMC:{{{pmc}}}}}
}}{{#if:|. {{{id}}} }}{{#if:|. ISSN {{{issn}}}}}{{#if:
|. Archived from the original on {{#if: |{{{archivedate}}} |Error: archivedate= not stated }} |{{#if:| Error: archiveurl= not stated}}
}}{{#if:2007-03-17
|. Retrieved on 2007-03-17
}}{{#if:
|{{#ifeq:{{{postscript}}}|no||{{{postscript}}} }} |.
}}{{#if:
| {{#ifeq:|on|“|"}}{{{quote}}}{{#ifeq:|on|”|"}}
}}</ref>
...
Another asserted fact.<ref name="Jackson1999" />{{#if:
|Template:Page needed
|{{#if:
|{{#if: |(|(p}}{{{page}}}) |{{ #if: |{{#if: |(|(pp}}{{{pages}}}) |{{ #if: |({{{at}}}) |:27, 422 }} }} }}
}}
...
With parentheses
AMA style puts superscripted page numbers inside parenthesis instead of after a colon. For editors that prefer this style, this template has parameters page, pages, and at.
- Code
An asserted fact.<ref name="Jackson1999">{{Cite book
|last=Jackson
|first=Jennifer
|title=The Unlightable Being of Bareness
|publisher=Funky Publications|location=[[San Francisco, CA]]
|year=1999
|isbn=1-2345-6789-0
}}</ref>{{rp|page=148}}
...
Another asserted fact.<ref name="Jackson1999" />{{rp|pages=233–7}}
...
A third asserted fact.<ref name="Jackson1999" />{{rp|at=dust jacket}}
...
{{Reflist}}
- Results
An asserted fact.<ref group="a" name="Jackson1999"></ref>{{#if: |Template:Page needed |{{#if: 148
|{{#if: |(|(p}}148) |{{ #if: |{{#if: |(|(pp}}{{{pages}}}) |{{ #if: |({{{at}}}) |:{{{1}}} }} }} }}
}}
...
Another asserted fact.<ref group="a" name="Jackson1999" />{{#if:
|Template:Page needed
|{{#if:
|{{#if: |(|(p}}{{{page}}}) |{{ #if: 233–7 |{{#if: |(|(pp}}233–7) |{{ #if: |({{{at}}}) |:{{{1}}} }} }} }}
}}
...
A third asserted fact.<ref group="a" name="Jackson1999" />{{#if:
|Template:Page needed
|{{#if:
|{{#if: |(|(p}}{{{page}}}) |{{ #if: |{{#if: |(|(pp}}{{{pages}}}) |{{ #if: dust jacket |(dust jacket) |:{{{1}}} }} }} }}
}}
...
Missing page numbers
If a reference needs a page number but it is missing, use {{{{#if:rp
| rp | tlx|... }}{{#ifeq:needed=y|needed=y| |needed=y }}{{#ifeq:{{subst:DATE}}|{{subst:DATE}}| |{{subst:DATE}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#if:| |... }}}}
or {{{{#if:rp
| rp | tlx|... }}{{#ifeq:needed=y|needed=y| |needed=y }}{{#ifeq:date=November 2024|date=November 2024| |date=November 2024 }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#if:| |... }}}}
. This will automatically use the {{{{#if:page needed
| page needed | tlx|... }}{{#ifeq:x|| |{{{2}}} }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#if:| |... }}}} template to add the article to the appropriate category. For example, <ref group="b" name="Jackson 1999 ex. 1" />{{{{#if:rp
| rp | tlx|... }}{{#ifeq:needed=y|needed=y| |needed=y }}{{#ifeq:{{subst:DATE}}|{{subst:DATE}}| |{{subst:DATE}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#if:| |... }}}}
results in: <ref group="b" name="Jackson1999"></ref>Template:Fix
This is preferable to something like {{{{#if:rp
| rp | tlx|... }}{{#ifeq:page number?|page number?| |page number? }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#if:| |... }}}}
or {{{{#if:rp
| rp | tlx|... }}{{#ifeq:?|?| |? }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#if:| |... }}}}
, since the cleanup categorization takes place. It is preferable to simply using {{{{#if:page needed
| page needed | tlx|... }}{{#ifeq:x|| |{{{2}}} }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#if:| |... }}}} in articles that make use of {{{{#if:rp
| rp | tlx|... }}{{#ifeq:x|| |{{{2}}} }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#if:| |... }}}}, since it preserves the use of the {{{{#if:rp
| rp | tlx|... }}{{#ifeq:x|| |{{{2}}} }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#if:| |... }}}} syntax.
Do not nest the {{{{#if:page needed
| page needed | tlx|... }}{{#ifeq:x|| |{{{2}}} }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#if:| |... }}}} template inside the {{{{#if:rp
| rp | tlx|... }}{{#ifeq:x|| |{{{2}}} }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#if:| |... }}}} template, or the results are too small to be legible for many readers, and with a stray colon: <ref group="b" name="Jackson 1999" />{{tlx|rp|{{{{#if:page needed
| page needed | tlx|... }}{{#ifeq:{{subst:DATE}}|{{subst:DATE}}| |{{subst:DATE}} }}{{#ifeq:x|| |{{{3}}} }}{{#ifeq:x|| |{{{4}}} }}{{#ifeq:x|| |{{{5}}} }}{{#ifeq:x|| |{{{6}}} }}{{#ifeq:x|| |{{{7}}} }}{{#ifeq:x|| |{{{8}}} }}{{#ifeq:x|| |{{{9}}} }}{{#if:| |... }}}}
results in: <ref group="b" name="Jackson1999"></ref>{{#if:
|Template:Page needed
|{{#if:
|{{#if: |(|(p}}{{{page}}}) |{{ #if: |{{#if: |(|(pp}}{{{pages}}}) |{{ #if: |({{{at}}}) |:Template:Fix }} }} }}
}}
Warning
This template should not be used unless necessary. In the vast majority of cases, citing page numbers in the <ref ...>...</ref>
code is just fine. This template is only intended for sources that are used many, many times in the same article, to such an extent that normal citation would produce a useless line in <references />
or too many individual ones. Overuse of this template will make prose harder to read, and is likely to be reverted by other editors. Used judiciously, however, it is much less interruptive to the visual flow than full Harvard referencing and some other reference citation styles.
See also
- Shortened footnotes in w:Wikipedia:Citing sources, which describes the most common way of citing multiple pages of the same source.
- {{w:sfn}}, a template that implements the most common way of citing multiple pages of the same source.