WMDE Technical Wishes/Sub-referencing/gpe
Sub-referencing | |
---|---|
Status | Edey progress insyd |
Origin | Technical Wishes survey 2013, 2015, 2022 den odas |
Focus area | Dem make reusing references easier |
Phabricator | project board |
Responsible | Technical Wishes Team |
![]() Tell we wat you dey think We dey invite you make you test our prototype, wich we dey update continuously. Watch dis page anaa sign-up to dis massmessage list make you learn about fresh things you fi test |
Currently, it's not possible to easily re-use the same reference with different details in an article. Community members have repeatedly requested a MediaWiki solution that works without templates and is based on the existing way references work, for both wikitext and VisualEditor. » Learn more about the problem.
As part of the focus area "Make re-using references easier", Wikimedia Deutschland’s Technical Wishes team is introducing Sub-referencing – an optional feature that allows you to easily attach different details to an existing reference without having to duplicate it.
Our plan is to bring sub-referencing to the Wikimedia wikis in 2025.
Sub-referencing in a nutshell
To cite a source more than once with different details, you need a main reference and a sub-reference.
- The main reference contains the main bibliographic information. In the screenshot below, "1. E. Miller …" in the References section represents the main reference.
- A sub-reference defines additional details, such as page numbers, chapters, verses, quotes, or video timestamps. In the screenshot, "1.1" and "1.2" followed by a page number represent two different sub-references.

- In the references section, readers see all sub-references grouped together below their shared main reference. This makes it easier to grasp how often a single source has been cited in the article.
- In wikitext you use a new attribute to define the details of a sub-reference. It’s called
details
. See below for more information and examples. - In VisualEditor, we're expanding the existing citation dialog so that it supports sub-references.
Main benefits
- Sub-referencing is largely based on the existing way references work.
- It's designed to work for both VisualEditor and wikitext.
- The solution will be integrated into the MediaWiki Cite extension, thus available across all Wikimedia wikis and usable without template-based workarounds.
- Sub-references will be properly displayed in Reference Previews and mobile reference pop-ups.
- It's optional. You can still use other methods for referencing. But you might encounter sub-referencing in articles written by other users.

Please tell us what you think. It's important that this new feature doesn't interrupt user workflows, that it's intuitive and that it works well for wikitext and VisualEditor users regardless of their experience level or knowledge about wikitext and templates. To make sure of that, we need your feedback:
- Test the prototype! » Read more about how to test.
- Give general feedback on the talk page.
- Watch this page or sign up to this massmessage list to learn about new things you can test.
How it works
In wikitext
The wikitext solution for sub-referencing can already be tested on the beta cluster. Sub-referencing will soon be fully functional in VisualEditor as well and will then be introduced at pilot wikis.
Benefits specific to wikitext
- The solution uses the existing and known concept of named references.
- It doesn’t require any knowledge of templates.
- Near-duplicate references can be removed in the wikitext, making it cleaner, less redundant and easier to read.
How to use sub-referencing in wikitext
1) Define a main reference
Before creating sub-references, you need a main reference that contains the full bibliographic information. This reference must be assigned a name:
<ref name="Miller">E. Miller, ''The Sun''. New York: Academic Press, 2005.</ref>
This main reference can either be defined in-line (within the article text) or in the reference section.
2) Creating a sub-reference for inline references
If the main reference is inline, you can create a sub-reference in two ways using the details
attribute:
Option 1: Modify the main reference to include additional details (e.g. a page number)
<!-- Add the details attribute directly to the <ref> tag -->
<ref name="Miller" details="Page 23.">E. Miller, ''The Sun''. New York: Academic Press, 2005.</ref>
<!-- As a next step, you can add another sub-reference using the following statement: -->
<ref name="Miller" details="Page 48." />
Example:

According to scientists, the Sun is pretty big. In fact, it is very big.<ref name="Miller" details="Page 23.">E. Miller, ''The Sun''. New York: Academic Press, 2005.</ref> Take their word for it.<ref name="Miller" details="Page 48." />
== References ==
{{reflist}} <!-- or <references /> -->
Option 2: Insert one or more separate sub-references directly within a new in-line statement while keeping the main reference intact.
<!-- Unchanged main reference (in-line): -->
<ref name="Miller">E. Miller, ''The Sun''. New York: Academic Press, 2005.</ref>
<!-- New sub-references: -->
<ref name="Miller" details="Page 23." />
<ref name="Miller" details="Page 48." />
Example:

According to scientists, the Sun is pretty big. <ref name="Miller">E. Miller, ''The Sun''. New York: Academic Press, 2005.</ref> In fact, it is very big.<ref name="Miller" details="Page 23." /> Take their word for it.<ref name="Miller" details="Page 48." />.
== References ==
{{reflist}} <!-- or <references /> -->
3) Create sub-references for list-defined references
If the main reference is stored in the <references>
tag or within {{reflist}}
(or similar templates), you don't need to redefine it in-line. Instead, simply use the following syntax in-line:
<!-- Add this directly to the chosen location in the article text -->
<ref name="Miller" details="Page 23." />
<!-- The list-defined reference stays unchanged: -->
<references>
<ref name="Miller">E. Miller, ''The Sun''. New York: Academic Press, 2005.</ref>
</references>
Example:

According to scientists, the Sun is pretty big. In fact, it is very big.<ref name="Miller" details="Page 23." /> Take their word for it.<ref name="Miller" details="Page 48." />
== References ==
<references>
<ref name="Miller">E. Miller, ''The Sun''. New York: Academic Press, 2005.</ref>
</references>
4) Reusing an existing sub-reference
Once a sub-reference has been defined, you can reuse it in multiple places without redefining the main reference. Simply repeat the same reference syntax in-line:
<ref name="Miller" details="Page 23." />
- Please note that this is not a regular reuse like you are used to with other references. While it does create some duplicates in wikitext, identical sub-references will be automatically merged in the reader and VisualEditor view to prevent unnecessary duplication in the rendered output.
- Auto-merging of identical sub-references – as shown in the example screenshots below – is still work in progress, currently "Page 23." would be displayed twice in the reference list.
- The same re-use option already works for regular references (both list-defined and inline).
- Tip: Copying and pasting an existing sub-reference statement remains a simple and recommended approach.
Example – reuse of inline sub-references:

According to scientists, the Sun is pretty big.<ref name="Miller" details="Page 23.">E. Miller, ''The Sun''. New York: Academic Press, 2005</ref> In fact, it is very big. Take their word for it.<ref name="Miller" details="Page 48." /> Don't look directly at the sun!<ref name="Miller" details="Page 23." />
== References ==
{{reflist}}
Example – reuse of list-defined references:

According to scientists, the Sun is pretty big.<ref name="Miller" details="Page 23." /> In fact, it is very big. Take their word for it.<ref name="Miller" details="Page 48." /> Don't look directly at the sun!<ref name="Miller" details="Page 23." />
== References ==
<references>
<ref name="Miller">E. Miller, ''The Sun''. New York: Academic Press, 2005</ref>
</references>
Keep In Mind

- Remember to always specify a reference name when using the details attribute. Using a reference name allows others to easily re-use the same reference with different details without needing to define a name first.
- Sub-referencing is not reserved for page numbers only. You can use it for other use cases, too. Some editors have mentioned to us that they’d like to use it for podcast timestamps, URLs, poetry verses, quotes, and other details.
- If you wish to use quotation marks
"
withindetails="…"
(e.g. when inserting a quote), make sure to use"
instead, or delimit the details with single quotes. VisualEditor users will be able to type " when filling out sub-reference details and it will be converted automatically in wikitext. Other special characters which might need to be handled similarly when used withdetails="…"
are<
and>
. - Some gadgets/scripts related to references might also need an update in order to properly work with the new sub-referencing solution.
- When using sub-references, please avoid templates that produce
<ref>
tags, as these cause issues in VisualEditor which we cannot solve at this point in time.
In VisualEditor
We are refining the user experience and workflows for sub-referencing in VisualEditor. Currently, there is one primary entry point via the "re-use" tab for creating a sub-reference, but the solution for VisualEditor is expected to evolve in the coming months.
You can test the current state of the VisualEditor solution on betawiki. Please keep in mind that there will still be changes. As always, we will keep you and these project pages updated as VisualEditor gains more capabilities and let you know when we need your feedback!
Benefits specific to VisualEditor
- To cite the same source with different details, you no longer have to create a new reference from scratch.
- Sub-references are designed to be fully compatible with VisualEditor (as opposed to template-based workarounds). You can create them via the citation dialog and you can edit them from within the references section.
Creating a sub-reference
- Creating a sub-reference currently works via the existing citation dialog.
- In the "re-use" tab, select the reference you want to re-use via the three dots and click "re-use this reference with additional details".
- Enter the details of that sub-reference and click insert.
- Alternatively, the option to add details can also be selected via the reference popup if the reference is already re-used.
Editing an existing sub-reference
- Click on the footnote marker in the article text and select the second edit button to change a sub-reference.
- You can now edit the details of the sub-reference.
- You cannot edit a sub-reference by clicking on it in the reference list – editing the main reference this way works as usual.
Re-using a sub-reference
- You can re-use a sub-reference using the "re-use" tab in the citation dialog.
- Alternatively, you can – as with regular references – select the footnote of a sub-reference and copy it to the desired location in the article using copy & paste, which also creates a re-use.
Please note
- We are working on creating an even more intuitive user experience for using references in VisualEditor. What you see now is just the beginning, among other things we have ideas for an improved reference editing dialogue. We will ask for feedback on some prototypes after deploying sub-referencing to the first pilot wikis.
- The existing behavior of creating automatic names for re-used references in VisualEditor also occurs with sub-referencing. Fixing this issue is out of scope for this project.
- Currently, if you re-use a sub-reference it will show as a duplicate in the reference list. Once we've improved the feature, the duplicates will automatically be merged in VisualEditor and the reader view.
Test the prototype
We need your feedback to make sure we build the right things. Feedback or questions are always welcome on this project’s talk page or by directly booking a call with our User Researcher.
The prototype is available on beta wiki. Currently, we primarily invite you to test the wikitext solution:

- They might look different (e.g. not use your preferred skin).
- They might offer some new features that are still being tested.
- They only contain some test pages and templates, not your entire wiki’s content, and not all the templates, modules, gadgets etc. you are used to.
- Your regular Wikimedia login doesn’t work on beta wikis. You can either register an account – make sure to use a different password than your regular Wikimedia account – or test the feature without an account, which will lead to the creation of a temporary account (on the Beta Cluster German Wikipedia), or display your IP address (on the Beta Cluster English Wikipedia).
The problem we are solving
In Wikipedia articles, it's common to reference a source multiple times. But while you can re-use a reference exactly as it is, you currently cannot re-use the same reference with different details (e.g. different page numbers). Your only option is to create a whole new reference or to use workarounds.
Status quo: Re-using references in wikitext and VisualEditor
If you want to re-use a reference in wikitext, you can turn it into a named reference and refer to that name at another point in the article. The named reference can be placed in the article text or in the references section. In VisualEditor you can use the option "re-use" in the citation dialog. In the references section, references with the same name are grouped together.
-
Wikitext: <ref name> in the article text
-
Wikitext: <ref name> in the references section
-
VisualEditor: citation dialog
-
Reader's view
Status quo: Re-using references with different details in wikitext
If you want to re-use an existing reference with different details in wikitext, you currently need to copy and paste the existing reference and change the details of the duplicate or create a new (almost identical) reference from scratch. Some projects use workarounds like short citations or template-based solutions like shortened footnotes. In the references section, the original reference and the new one you created are not grouped together.
-
Two almost identical references in the wikitext.
-
Reader's view: Almost identical references are not grouped together
-
Workaround with short citations in wikitext
-
Reader's view: workaround with short citations
-
Workaround with {{sfn}} in wikitext
-
Reader's view: workaround with {{sfn}}
Status quo: Re-using references with different details in VisualEditor
If you want to re-use an existing reference with different details in VisualEditor, neither the option "re-use" in the citation dialog nor the copy-and-paste method will work, because both lead to identical re-uses, and changing details of the re-used/copied reference changes both instances of that reference. Instead you’ll need to create a new (almost identical) reference from scratch. In the references section, the original reference and the new one you created are not grouped together.
References created by template-based workarounds like {{sfn}} cannot be edited from within the references section and don’t appear in the citation re-use tab; but it is possible to edit them manually when locating them in the article text.
workaround with {{sfn}}:
-
Reader's view
-
The references disappear from the references section when clicking "edit".
-
It is not possible to use {{sfn}} references via the "re-use"-dialog.
-
References can only be edited when locating the reference in the article text
Problems for readers
Template-based workarounds are not properly displayed in Reference Previews, Reference Tooltips and mobile reference pop-ups.
{{sfn}} workaround with previews for references:
-
Reference Previews: The main information is not included in the pop-up.
-
Reference Tooltips: The main information is not included in the initial pop-up.
-
Reference Tooltips: The main information is shown in another pop-up.
-
mobile reference pop-ups: The main information is not included.
Main problems with the status quo
- The experience of VisualEditor and wikitext users is very different.
- Most workarounds for reusing references with different details don’t work properly in VisualEditor.
- Creating lots of almost identical references with different details makes the wikitext longer and potentially harder to read.
- Template-based workarounds are not equally accepted by all communities and thus not globally available.
- Some users try to avoid this issue by putting sources in the bibliography section without using them as references at all, which makes it harder to verify sections of the article.
Recent changes and next steps
Our team has worked on this problem on and off for some time now. Here is an overview of this project’s history, including our research.
Thank you to everyone who participated in tests and interviews and who showed interest, as well as everyone who took the time to comment on our talk pages over the years. It is deeply appreciated. If you have further feedback, please share it on the talk page.
Updates
In 2024 we worked on a prototype for discovery and testing purposes based on the extends syntax and engaged with the community through multiple on-wiki communications, user testing sessions, and workshops in different venues, including Wikimania 2024.
In October/November 2024, we explored possible changes to our wikitext approach, based on the community feedback we've received. We reached out to communities and presented a new solution to get their feedback on its usability. We found that the feedback was mixed but nothing spoke against the feature bringing its intended value to the community.
In 2025, we started the development of the new syntax. The engineers and designer of the Technical Wishes team are working on building out sub-referencing.
- We will deploy sub-referencing in July 2025 to German Wikipedia as our first pilot wiki. We will reach out to other potential pilot wikis soon.
Next Steps
The Technical Wishes team’s focus remains on completing the sub-referencing feature.
- We’ll update you continuously as the feature evolves on the betawiki and we need you to test it.
- Conducting user testing sessions with community members to help us with intuitively designing the VisualEditor workflows.
- Once the development has reached a stable state, we will reach out to other potential pilot wikis to plan deployments.
- We are planning to deploy the sub-referencing feature to other Wikimedia wikis in 2025.
- We will continue to collect feedback to improve the solution after deployment.
We are aware of other problems in the focus area "reusing references", and we will try to address them along the way. Our focus, however, remains on creating a solution for sub-referencing.
Archived updates from 2024
A prototype is available on beta wiki. It covers the wikitext solution and some of the basic features of the VisualEditor solution. You can continuously test the prototype and give feedback.
We've sent out announcements across all wikis to let communities know about this upcoming feature, and have invited them to test and give feedback.
Our team presented sub-referencing at Wikimania 2024 and discussed with participants. (YouTube)
Moderated users tests took place across different projects in 2024.
- As of October/November 2024, we are currently exploring possible changes to our wikitext approach, based on the community feedback we've received. We'll reach out to communities soon to get more feedback on possible changes to the sub-referencing feature.
- Pilot wiki deployment is stalled, pending discussions and potential changes to our feature.
- We are planning to deploy the sub-referencing feature to other Wikimedia wikis in 2025.
- We will continue to collect feedback to improve the solution after deployment.
Frequently Asked Questions
How can I find articles that use sub-referencing?
A tracking category called Category:Pages that use sub-references is added to any page where sub-referencing is used, allowing you to explore or fix pages using the new feature. The name of this category might change.
Also, the team has created a number of examples on the English betawiki.
Can I insert a template into the details
attribute?
The feedback we received so far from the community suggests that using templates in an attribute may cause more issues than benefits. As such, we are evaluating whether to allow templates based on technical feasibility, their impact on VisualEditor’s rendering of references, and other concerns raised by contributors.
We will update you once we have learned more and a decision has been made. Please know that we will always include the community before such a decision is made. If you already have specific ideas about the use of templates within the details attribute, please let us know on our talk page.
How will the new feature affect existing gadgets and scripts?
Some gadgets and scripts related to references might need an update in order to properly work with the new sub-referencing solution. Because gadgets and scripts are in the hands of the wiki communities, we are unable to adapt them.
Please let us know, on the talk page, if you discover any problems or need some help updating citation templates to make them work with the new feature.
Why did you choose this wikitext syntax?
This post provides a rationale for choosing the details
syntax. We believe that the best and quickest path to delivering a usable feature is through the chosen syntax, even though it does come with some limitations.
Historically, no syntax has been perfect, and each solution has its shortcomings. After long discussions and consultations with multiple teams at the Wikimedia Foundation, we've concluded that this solution meets our technical requirements and is sustainable for long-term maintenance.
It's also fully compatible with wikis that continue to rely on or prefer using {{reflist}}
. This syntax allows the main reference to be used in-line without needing to be placed in the References section, which would otherwise cause limitations in the VisualEditor.
Furthermore, we’re confident that this approach will work consistently across VisualEditor workflows as well.
Why did it take so long to find a solution?
The Technical Wishes team has worked on this feature on and off for many years. If you want to know more, here’s an overview of the history and complexity of this problem.