TODO: carefully deduplicate with {T100645}
== Problem statement ==
If several references cite different passages from the same book, you need to create full, separate citations. This lengthens the wikitext, and crowds the reference section. In print, this can be avoided with footnotes like "Ibid., page 29" and other conventions.
Note that there are multiple styles for these redundant citations. We will not be able to find a solution which allows for all styles.
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 `extends` (bikeshed naming here: T171581), which is similar to `name` in that one reference can link to another. When using `extends`, the sub-reference will appear indented under the main reference, and its footnote marker will include a derivative number like "2.1".
Example:
```
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 from the same book.<ref extends="seuss">pp. 10-12</ref>
```
Example rendering:
{F30483559}
== 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}
* Render book-references when reading articles.
* {T151308}
=== 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 `extends` 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.
* 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.
* When the `extends` 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.
=== Performance ===
There is no expected impact on performance.