Problem statement
When several references cite different passages from the same book, each will include a full, redundant citation. This lengthens the wikitext, and crowds the reference section.
In print, there are multiple conventions for avoiding this, for example footnotes which read "Ibid., page 29" to cite a page from the most recent full reference, or "Seuss, p. 29" if the author's name unambiguously identifies a previous reference. Note that there are multiple styles for these redundant citations, and we won't be able to find a solution which supports all the different styles.
For more background, see the German technical wishes page for this feature request: (de) https://de.wikipedia.org/wiki/Wikipedia:Technische_W%C3%BCnsche/Topw%C3%BCnsche/Erweiterung_der_Einzelnachweise
Proposed solution
We will introduce a new <ref> attribute named refines (please bikeshed naming here: T171581), which is similar to name in that one reference can link to another. When using refines, the sub-reference will appear indented under the main reference, and its footnote marker will include a derivative number like "2.1". With refines, the reference can include additional information such as a page number, whereas a reference using name is a wholesale repetition of another footnote.
Example usage:
This statement is from a popular children's book.<ref name="seuss">{{Cite book|author=Dr. Seuss|title=Horton Hears a Who}}</ref>
Later, I'll make another point sourced from the same book.<ref refines="seuss">pp. 10-12</ref>Example rendering:
Alternatives
- There is a template {{Rp}} or {{Refpage}} in light usage (approximately 1 in every 300 articles), which allows a minor annotation after reusing a reference, looking something like this: "[1]:23" to refer to page 23 of reference [1]. The maintainer has suggested that the template would be deprecated by our solution proposed here.
- Structured references and bibliographical information in Wikidata, see WikiProject Source MetaData and {{cite q}}
Implementation notes
Most or all of the work will be done in the Extension:Cite codebase, we don't expect to make MediaWiki core or parser changes. These are the main implementation points:
- T151301: Implement "extends"-attribute for ref-tag
- Render book-references when reading articles.
- T151308: Make VisualEditor compatible with "extends" parameter
Undeployment
Since we're suggesting a wikitext change, it's important to handle the potential rollback scenario. There are a few precautions we can take:
- When the refines attribute is first introduced, the supporting patch might have no effect on rendering.
- Rendering sub-references will be deployed as its own patch, and enabled with a feature flag. When this flag is disabled, rendering will revert to the status quo.
- When the refines attribute is used on a page, we will add a page property which makes it possible to identify all pages where the attribute has been used. This will help us track any potential cleanup work as it becomes necessary. After our feature has stabilized and there's no more chance of a rollback, we can remove the page property.
- We might suggest that the first usages continue to duplicate the "main" reference's content, so that the sub-reference is still readable even if the rendering has to be rolled-back. This is voluntary and will be unattractive to editors, so probably not a viable approach.
Performance
There is no expected impact on performance.
