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 talk:R

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia

Backlinks?

[edit]

The references to backlinks are confusing. Several examples of |a= show rendering with no backlinks. There is an example of an annotation that includes #[[#L1|^]], with no explanation of what that markup means and no link to its documentation. -- Shmuel (Seymour J.) Metz Username:Chatul (talk) 15:37, 27 October 2025 (UTC)Reply

Strange behaviour

[edit]

When the text of a named reference contain the template {{harv}} all the text is enclosed in parenthesis. For instance, from this: {{r|n=Myname|r={{harv|Armand|2000|p=12}}.}}, I get "(Armand 2000 p. 12)". Instead if I use {{harvp}} everything is correct, that is "Armand (2000) p. 12". where does this behaviour come from? Please help. Carlotm (talk) 02:52, 12 December 2025 (UTC)Reply

I don't understand what you're trying to do. harv and harvp are for an entirely different citation technique. EEng 03:36, 12 December 2025 (UTC)Reply
When a short note, which I link to the full citation through {{sfn}} (or {{sfnp}}) is being repeated more than once, I use {{r}} and, obviously, I must replace {{sfn}} (or {{sfnp}}) with {{harv}} (or {{harvp}}). What's wrong with all this? Unfortunately I cannot use {{harv}} because the entire short note is getting, unexpectedly, enclosed in parenthesis. I wonder why.Carlotm (talk) 04:16, 12 December 2025 (UTC)Reply
@Carlotm you want {{harvnb}} (no brackets). {{harv}} is meant to add parentheses; it was used for inline parenthetical citations before they were deprecated. Rjjiii (talk) 04:56, 12 December 2025 (UTC)Reply
@Rjjiii That's it! I am very pleased. Thanks Rjjiii, very much.Carlotm (talk) 06:06, 12 December 2025 (UTC)Reply
Also, if you're using sfn or sfnp you don't need to jump through hoops using r to reuse footnotes rather than making duplicate footnotes: they will do it automatically. Just copy the same sfn or sfnp code in each place you want to use it; you will only get one footnote, reused in each place. —David Eppstein (talk) 06:16, 12 December 2025 (UTC)Reply

Delete "p=" parameter

[edit]

For example,[1]:22

This parameter is very confusing for non-editor readers. What are they supposed to understand from it? A math equation? What does 1/22 even mean?

I suggest deleting this confusing parameter. There are plenty of other templates that already include page numbers, such as Cite book. IdanST (talk) 20:16, 18 February 2026 (UTC)Reply

References

  1. Cite error: The named reference RefName was invoked but never defined (see the help page).
See ongoing discussion at Wikipedia talk:Citing sources § Referencing individual page numbers by embedding pdf links. —David Eppstein (talk) 20:22, 18 February 2026 (UTC)Reply
It's a variant of the AMA style. See this explanation for an example. – Jonesey95 (talk) 16:31, 21 February 2026 (UTC)Reply

Easy ready enhancement - Display quotation when no locator is supplied

[edit]

Display a small dagger () when {{r}} has a quotation but no page, pages, or location parameter/ Currently, the quotation is present but has no visible tooltip target.

I made a proof of concept at User:Very Polite Person/draft/Template:Rqi, demonstrated at User:Very Polite Person/sandbox. Existing output is unchanged; the dagger appears only when a quotation is supplied without a locator.

See here and mouse over the dagger symbol with dotted underscore: https://en.wikipedia.org/w/index.php?title=User:Very_Polite_Person/sandbox&oldid=1364282264

This was done by changing this:

|location{{#if:{{{location1|{{{location|{{{loc1|{{{1loc|{{{loc|{{{at1|{{{at|}}}}}}}}}}}}}}}}}}}}}||NULL}}={{{location1|{{{location|{{{loc1|{{{1loc|{{{loc|{{{at1|{{{at|}}}}}}}}}}}}}}}}}}}}}

To:

|location{{#if:{{#if:{{{location1|{{{location|{{{loc1|{{{1loc|{{{loc|{{{at1|{{{at|}}}}}}}}}}}}}}}}}}}}}|x|{{#if:{{{page1|{{{page|{{{p1|{{{1p|{{{p|}}}}}}}}}}}}}}}{{{pages1|{{{pages|{{{pp1|{{{1pp|{{{pp|}}}}}}}}}}}}}}}||{{#if:{{{quotation1|{{{quotation|{{{quote1|{{{quote|{{{q1|{{{q|}}}}}}}}}}}}}}}}}}|x}}}}}}||NULL}}={{#if:{{{location1|{{{location|{{{loc1|{{{1loc|{{{loc|{{{at1|{{{at|}}}}}}}}}}}}}}}}}}}}}|{{{location1|{{{location|{{{loc1|{{{1loc|{{{loc|{{{at1|{{{at|}}}}}}}}}}}}}}}}}}}}}|{{#if:{{{page1|{{{page|{{{p1|{{{1p|{{{p|}}}}}}}}}}}}}}}{{{pages1|{{{pages|{{{pp1|{{{1pp|{{{pp|}}}}}}}}}}}}}}}||{{#if:{{{quotation1|{{{quotation|{{{quote1|{{{quote|{{{q1|{{{q|}}}}}}}}}}}}}}}}}}|†}}}}}}

This would allow this template to then display quotes ad hoc, inline, on any reference usage - and for good measure, it'll be the easiest way to use/deploy quotes for in-line usage like this. — Very Polite Person (talk/contribs) 17:21, 15 July 2026 (UTC)Reply

Why would you use r when there is no page, pages, or location parameter? If you're using it with cs1 just put the quote in quote= PARAKANYAA (talk) 21:32, 15 July 2026 (UTC)Reply
I've been in the habit of trying to keep the same uniform style within articles I'm doing, and r is pretty great for simple reuse of named refs (list defined) and assigning snippets of quotes inline (see Amanda Jones (inventor). I put up a mock edit here:
https://en.wikipedia.org/w/index.php?title=Amanda_Jones_(inventor)&diff=next&oldid=1364313524
Of what it could look like to do this with a site that has no page identifiers. This would let you use a website article, say, any number of times, and each usage could have it's own unique in-line quote value. Beats using rp, ref combos and other stuff--keeps it all in the r wrapper with this one change. — Very Polite Person (talk/contribs) 21:38, 15 July 2026 (UTC)Reply
I think that that is massive, massive overkill and I'd oppose adding that. PARAKANYAA (talk) 21:47, 15 July 2026 (UTC)Reply
The ability to have unique quotes inline against a single URL source is overkill? Or because of using r? That's basically all I was after, that specific use case. — Very Polite Person (talk/contribs) 21:49, 15 July 2026 (UTC)Reply
@PARAKANYAA, Very Polite Person: Yes, if anything the template should be modified to emit an error when used with a quote but without a location or page. For a website article, you could use something like the {{r|RefName|at=para. 7}} example given in the documentation, but the citation format used by this template is confusing enough without introducing seemingly meaningless notation such as 1:† into the mix. Hopefully this whole mess goes away when meta:WMDE Technical Wishes/Sub-referencing is enabled and we can refactor this template to use that format instead. --Ahecht (TALK
PAGE
)
21:46, 15 July 2026 (UTC)Reply

I would advise against using quotes in {{r}} (regardless of the page number) due to accessibility issues. @Quiddity already mentioned some issues a few years ago (issues for screenreaders and discoverability problems – how many readers will realize that they can hover over the page number to see details like a quote?). The tooltip also doesn't seem to work on mobile devices which means the majority of readers cannot access it at all. --Johannnes89 (talk) 09:33, 19 July 2026 (UTC)Reply

well, shit. Back to formula. — Very Polite Person (talk/contribs) 14:16, 20 July 2026 (UTC)Reply
I suppose I need to bite the bullet and start doing sfn/sfnq like this then... https://en.wikipedia.org/w/index.php?title=Historiography_of_science&oldid=1357780379#cite_note-12
R was just so visually simple/intuitive and the compactness as a view is delightful, but that's the price, I suppose. — Very Polite Person (talk/contribs) 15:15, 20 July 2026 (UTC)Reply