Jump to content

Community Wishlist Survey 2021/Citations/Tool for separating the references from the body text

From Meta, a Wikimedia project coordination wiki

Tool for separating the references from the body text

  • Problem: Most often bibliographic references are directly mixed within the text and the code of the page. This considerably clutters the code of the page and makes difficult to locate the exact place where to do the needed additions or modifications directly in the page code, especially for long sections. This is a long problem affecting most of Wikipedia pages since the beginning. Even if some skilled contributors try to use Harvard name and date style and tricks with notes to locate all their references in the reference list at the end of the page, afterwards other contributors will directly insert their references in the body text of the page and the maintenance of the code becomes extremely tedious and a never-ending story.
  • Who would benefit: All contributors for an improved experience of editing the page code without being perturbed by the full references directly embedded in the code.
  • Proposed solution: To adopt the same approach that in all the references management programs (End Note, Reference Manager, Pro Cite, Zotero, Mendeley, ...). By clearly separating the in line citation in the text (with the reference name or ID only present in the text where the citation has to appear in the text) from the references data or code stored apart at the end of the page in the section reference. An interesting alternative is given in another proposal: it is to store the references directly in Wikidata as metadata for the page. Then an advantage is the centralization of all the references in one single place where the different Wikipedia sites could store, share, translate and discover all the common references.
  • More comments: Bots could be developed to assist for the migration of the references data or code at the end of each page in the references section or even better in one central place in Wikidata. I realize not to be the first for wishing such a feature. I already read this suggestion on different Talk pages and it is also probably discussed and advised in Wikipedia help pages and references templates since a long time. So, sorry to likely reinvent the warm water, but I think it is worth to insist once again on this never resolved issue in Wikipedia. I also realize the considerable technical challenge, or work, this could imply, but the question is certainly worth to be addressed once again and to find and implement a real solution. This will represent a real improvement in the code of each page. Aim: a cleaner and more accessible page code.
  • Phabricator tickets:
  • Proposer: Shinkolobwe (talk) 19:25, 24 November 2020 (UTC)[reply]


@JAn Dudík and Jvs: Thank you for this information. I had a quick look at the proposed link with automatic translation from the Czech language to English, but I could not immediately find on the page a specialized function to directly do this job. I did not try to use the script too. So, I cannot presently assess if this tool is sufficient for solving the problems to be addressed but it could be a good first start. Thank you. Shinkolobwe (talk) 11:56, 25 November 2020 (UTC)[reply]
http://josef-svoboda.site44.com/wiki/wikiref2.html JAn Dudík (talk) 20:35, 25 November 2020 (UTC)[reply]
  • I'm not completely sure if this is what you are looking for, but if you need a tool to assist in moving inline citations into a references section in order to change them into so called list-defined references (framed by <reference></reference> or wrappers like Template:Reflist), in the English Wikipedia this tool might be helpful (to be added to your common.js):
If you are looking for ways to pull citations defined at Wikidata into Wikipedia, the English Wikipedia has an (still experimental) implementation for this named Template:cite Q.
--Matthiaspaul (talk) 17:36, 25 November 2020 (UTC)[reply]
hmmm seems like a solution; but i'd need to use it first to see if it fits. BTW this need more advertisement, never saw this before on the citation and reference help pages. TRANSviada (talk) 18:47, 8 December 2020 (UTC)[reply]
  • This working well would be conditional on some easy way to expand (without needing to jump to and from paragraph to bottom of source text) - either all refs or individual refs. 20:44, 9 December 2020 (UTC)[reply]
  • FYI: w:Help:List-defined references.--BoldLuis (talk) 13:29, 11 December 2020 (UTC)[reply]
  • I agree that systematically using list-defined references with the reflist template is the cleanest way to introduce references in a page without cluttering the wiki code. However, too many contributors do not use, or do not know, this way to proceed. So, even if a page was first created with a clean references system from the beginning, it rapidly evolves to a less ordered situation and the entropy in the wiki code increases. Most of the pages of Wikipedia are affected because there exist many ways to introduce the references and that their direct insertion in the text of the wiki code is still the preferred, or the most popular, option today. What is lacking is an uniform and systematic approach for inserting the references (with a template or as a simple text, it is not the problem) at the end of the page, below the wiki code. Implementing a feature in the visual editor (VE) to do that is a very first necessary, but also a mandatory, step. But a reliable and robust tool to progressively clean the wiki code of the existing pages automatically (a bot), manually (a script in the user preferences) or semi-automatically (a piloted bot) would be welcome. Anyway, it also requires both a change in editing habits for those directly editing the code, and also a change in the visual editor. Without a change in the visual editor it will not be possible to improve the situation. The very first objective is to have a clean wiki code on the page and a tool to clean the code in a reliable way. The centralized management of references on Wikipedia or Wikidata is still another question. It will be better to adopt a stepwise approach than to reject a too ambitious proposal. Modest improvements, step by step, would already have a high added value. Shinkolobwe (talk) 11:37, 17 December 2020 (UTC)[reply]