Page MenuHomePhabricator

Book Referencing proposal
Closed, ResolvedPublic

Description

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:

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.

Event Timeline

awight renamed this task from [Draft to [Draft] Book Referencing proposal.Sep 27 2019, 11:07 AM
awight created this task.
awight added a project: TechCom-RFC.
awight updated the task description. (Show Details)Sep 27 2019, 11:50 AM
awight updated the task description. (Show Details)Sep 30 2019, 9:29 AM
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptSep 30 2019, 9:29 AM
awight updated the task description. (Show Details)Sep 30 2019, 9:45 AM
awight updated the task description. (Show Details)Sep 30 2019, 9:58 AM
awight updated the task description. (Show Details)Sep 30 2019, 10:15 AM
awight updated the task description. (Show Details)
awight renamed this task from [Draft] Book Referencing proposal to Book Referencing proposal.Sep 30 2019, 12:59 PM
awight updated the task description. (Show Details)Sep 30 2019, 1:08 PM

Will it be possible to name and reuse refined references?

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" name="seuss1012">pp. 10-12</ref>

Even later, another one sourced from the same location in the same book.<ref name="seuss1012" />

I think this is already implied in the screenshot (1.2 appears to be used twice), but I just want to clarify.

Mvolz added a subscriber: Mvolz.Sep 30 2019, 1:47 PM

Will it be possible to name and reuse refined references?

Good point! Yes, I think that should be possible to reuse a sub-reference. We won't support a second level of nesting, on the other hand. No "refines" of a refinement, just because it would increase the complexity of the UI and rendering, for little gain.

The 'example rendering' above shows each reference taking up a line of screen space, though containing just a few characters. Can't we make better use of vertical screen space by lining up the page references horizontally?

The 'example rendering' above shows each reference taking up a line of screen space, though containing just a few characters. Can't we make better use of vertical screen space by lining up the page references horizontally?

That sounds reasonable, but there seems to be a trade-off between efficient use of screen real estate and usability. Since footnote markers and page numbers are both numbers, it might be helpful to keep the left/right distinction to help readers scan down the list to find a specific marker. Another factor to consider is that many wikis will already have a two- or three-column reference layout.

Perhaps this is a detail we can work out iteratively, based on feedback from the simpler rendering?

Anomie added a subscriber: Anomie.Sep 30 2019, 2:41 PM
Izno added a subscriber: Izno.Sep 30 2019, 3:15 PM

Will it be possible to name and reuse refined references?

Good point! Yes, I think that should be possible to reuse a sub-reference. We won't support a second level of nesting, on the other hand. No "refines" of a refinement, just because it would increase the complexity of the UI and rendering, for little gain.

Please ensure you (collectively) have read all the related tasks in the constellation for this feature. This question has been answered therein.

(I am personally not a fan that we have Yet Another Task for all this, on that point, but I was earlier convinced that homework had been done by the mention of one of those other tasks in the description. I am not so sure now.)

Izno added a comment.Sep 30 2019, 3:18 PM

The 'example rendering' above shows each reference taking up a line of screen space, though containing just a few characters. Can't we make better use of vertical screen space by lining up the page references horizontally?

Most wikis are using or have been using multi-column referencing, which limits the real estate more than otherwise. We also do not know what other information may end up in the refined references e.g. quotations or chapter information. This is why the syntax is intended to be "refines" or similar rather than parameters like "page" (as a separate proposal had it).

awight moved this task from Unsorted backlog to External on the Cite board.Oct 1 2019, 8:54 AM

TLDR: This is a good thing, but this feature real worth will be in deploying it everywhere and actually using it as similarly as possible across all wikis.

One of the elephants in this room is that different wikis have different solutions for this problem. I suspect that the Sfn solution in the English Wikipedia, for example, is used far more than {{Refpage}}. An often-forgotten problem with this is that it makes to translate articles.

A common response to this is that "different wikis need different citations", but it's not quite true. Most of the time the same citations are needed for the same content. They can look differently in different wikis, as the task description suggests, but the semantic syntax should be the same, so that translators and translation tools will be able to adapt it from language to language with as little effort as possible, preferably no effort at all.

The 'example rendering' above shows each reference taking up a line of screen space, though containing just a few characters. Can't we make better use of vertical screen space by lining up the page references horizontally?

Most wikis are using or have been using multi-column referencing, which limits the real estate more than otherwise. We also do not know what other information may end up in the refined references e.g. quotations or chapter information. This is why the syntax is intended to be "refines" or similar rather than parameters like "page" (as a separate proposal had it).

This is not supposed to be a blocker.

Multi-column formatting is used inconsistently, ad hoc in different articles. It's implemented differently in different wikis.

It's also extremely desktop-oriented. It should be consistent across articles and wikis, and it should be automatic, and responsive.

TLDR: This is a good thing, but this feature real worth will be in deploying it everywhere and actually using it as similarly as possible across all wikis.
One of the elephants in this room is that different wikis have different solutions for this problem. I suspect that the Sfn solution in the English Wikipedia, for example, is used far more than {{Refpage}}. An often-forgotten problem with this is that it makes to translate articles.
A common response to this is that "different wikis need different citations", but it's not quite true. Most of the time the same citations are needed for the same content. They can look differently in different wikis, as the task description suggests, but the semantic syntax should be the same, so that translators and translation tools will be able to adapt it from language to language with as little effort as possible, preferably no effort at all.

Thanks for helping us keep a broad perspective! Our design is meant to support a specific style of subreferences, rather than generalize to the many existing styles. I'm not sure how this will affect adoption on the various projects.

awight closed this task as Resolved.Oct 22 2019, 11:58 AM
awight moved this task from Watching to Done on the WMDE-QWERTY-Sprint-2019-10-09 board.

The comments have been helpful, I'll close this task for now but feel free to continue adding to it as thoughts occur, or to reopen if a blocker is discovered.