Jump to content

Community Wishlist Survey 2021/Citations/Allow editors to identify the specific text that is supported by a citation

From Meta, a Wikimedia project coordination wiki

Allow editors to identify the specific text that is supported by a citation

  • Problem: Citations are normally added at the end of a block of text, such as a paragraph. The text may be supported by the cite when initially written, but later editors commonly add new unsourced material within the paragraph without any concern as to whether the modified text still matches the source. Similarly, an initially-unsourced paragraph may later have a sourced sentence added to the end. In either case, there's no way for a reader looking at text with a terminal citation to know which parts are supported. All of it? Maybe just the last sentence? Or perhaps just some unspecified parts of the text?
  • Who would benefit: Editors and readers who value precise citations.
  • Proposed solution: Provide an easy-to-use mechanism for VE editors to indicate the exact text that a citation supports. This could be done by allowing the editor to select a range of text before adding the cite. The selected text should always remain linked to the cite, even if broken up into text fragments by a later edit, or separated from the reference by a later interpolation. Also needed is some way of displaying to a reader the text that the citation supports, for example by hovering over the reference.
  • More comments : There is a template called Ref supports2 that allows supported text to be identified in the source editor, but it's very rarely-seen - probably due to the fact that it's difficult to use and makes the source text almost unreadable.
One issue to be considered is how any such VE edit should be handled when viewed in the source editor. If all the necessary markup is made visible by default, as with Ref supports2, the source view would become very complicated. Options might include not showing or allowing use of the new feature there at all (essentially making it VE only), or hiding the additional markup by default and having a toggle button to make it visible when required. A nice implemention would allow VE editors to indicate exactly what is supported every time they add a new citation with just a single swipe of the mouse or a few keystrokes; and without impacting in any way on uninterested VE or source editors who can continue to edit exactly as before. But we have to leave implementation details to the programmers.


  • Is it en:Template:Ref supports2 that you're thinking of? That never really caught on; the problem was that although it made it easier to illustrate exactly what statement was supported by which citation, it made the source editor edit window utterly incomprehensible. (See reference 5 on en:British Polio Fellowship—hovering over the reference does indeed make it clear that the reference is supporting the statement "as a self-help and mutual aid society for those affected by polio", but at the cost of doubling the length of the reference.) Iridescent (talk) 15:56, 19 November 2020 (UTC)[reply]
Thank you, yes that was what I'd seen. But I agree that that solution is not at all user-friendly in the source editor. I've amended the proposal to discuss the existing template. MichaelMaggs (talk) 14:40, 20 November 2020 (UTC)[reply]
Another big problem is that once you wrap a whole sentence in a template it becomes much harder to edit in the visual editor. ESanders (WMF) (talk) 12:33, 30 November 2020 (UTC)[reply]
Indeed. Another reason why the existing situation is not good. MichaelMaggs (talk) 09:27, 9 December 2020 (UTC)[reply]
  • There is an issue here, but it is wrong to assume that all additions after the reference is added aren't using the same reference. Frankly, VE editors don't add many refs in the first place. What if multiple refs support the same text? Johnbod (talk) 19:27, 20 November 2020 (UTC)[reply]
The same text supported by several references would be selected several times. Don't see any problem with that. MichaelMaggs (talk) 21:51, 20 November 2020 (UTC)[reply]
  • Another approach to this problem (looking at it from a different angle) is to use the |quote= parameter (and friends like |script-quote=, |trans-quote=, and |quote-page(s)=) of the CS1/CS2 citation templates (in the English Wikipedia), and provide an excerpt of the relevant section of the cited source supporting the statement in the article. That is, not duplicate the (ever changing) article prose in a template parameter but cite the original prose from the source. Depending on the circumstances, this may be more or less suitable than the other way around. --Matthiaspaul (talk) 12:04, 11 December 2020 (UTC)[reply]
I do this fairly frequently, also because the cited source could be changed or break in the future. — Alexis Jazz (talk or ping me) 12:24, 11 December 2020 (UTC)[reply]
In some cases, specifying verbally might work better: own essay, but en:WP:Contort the citations on how to describe the info you are citing in a citation if needed. Admittedly this won't help those editors who carelessly insert uncited text before a cite without a cn tag. HLHJ (talk) 23:27, 19 December 2020 (UTC)[reply]
  • This is basically a type of annotation. Annotation support would be super useful. Unfortunately, also super hard. --Tgr (talk) 07:03, 14 December 2020 (UTC)[reply]
    I would love to see a generalised Annotation service as a separate Wikimedia project. But, yes, very hard especially if you want to annotate third-party pages that you don't control and which could change unpredictably. Core content like references needs to be stored with the page revision, though. Pelagic (talk) 03:10, 16 December 2020 (UTC)[reply]
  • Markup could be doable by building on named references. Let's say you introduced an extension element <refd> or <refby> for "referenced by". Then you could have <refby name=one><refby name=two>The sky is blue.</refby> <refby name=three>And the sun is hot.</refby></refby> Hooking up the plumbing for reference popups, etc. would be another matter. Pelagic (talk) 03:28, 16 December 2020 (UTC)[reply]
    Of course, someone would lay a template on top of that so that you could write it more succincly as {{refby|two|The sky is blue.}}...etc., avoiding the "name=" and "/refby". But templated markup would behave differently under VE than tagged markup. Pelagic (talk) 03:37, 16 December 2020 (UTC)[reply]
    A span tag for references, similar to, say en:Template:Failed verification span. That's more readably structured than Template:Ref supports2, but still not optimal. Making a new ref template would be easy to do; design proposals? HLHJ (talk) 23:27, 19 December 2020 (UTC)[reply]
  • I agree in principle that clearly indicating the semantic link between citation and supported text is good. I'm not sure how best to do this. HLHJ (talk) 23:27, 19 December 2020 (UTC)[reply]
  • [Added after the survey was closed] While the survey is long closed, I think it might be worth noting that a "context section" feature has been recently added by me to the r citation template in the English Wikipedia. Among many other things it allows to define a (possible non-continuous) section in the same way as with ref supports2 and will display this as a tooltip when hovering with the mouse over the superscript link where the citation was invoked. The name of the context section can be given as a parameter value, but by default the template will derive a (practically) unique name itself from the name=, group= and various in-source-location parameters. Using CSS, it might be possible to further improve this in the future so that the marked text in the article gets highlighted when hovering over the reference link.
Since it was mentioned elsewhere inhere as well that annotations would be a desirable feature to have, I'd like to mention that r also implements some kind of annotation system now to define various kinds of annotations (page numbers, quotations, other commentary, sub-references or even other citations) as part of the citation template's invocation, and the template will display parts of this information in form of a tooltip when hovering over the reference link and optionally also combine it into the full citation defined elsewhere where it will be appended at the end of the original definition.
While both features aren't exactly what was asked for in this thread, they still might be useful for some. --Matthiaspaul (talk) 15:06, 24 September 2021 (UTC)[reply]


Thanks for the long-term support :) Making the source text more complex is currently the only editing option. The proposal explicitly aims to get away from that. MichaelMaggs (talk) 09:23, 9 December 2020 (UTC)[reply]