WMDE Technical Wishes/Sub-referencing
Sub-referencing | |
---|---|
Status | In progress |
Origin | Technical Wishes survey 2013, 2015, 2022 and others |
Focus area | Make reusing references easier |
Phabricator | project board |
Responsible | Technical Wishes Team |
![]() Tell us what you think We invite you to test our prototype, which we update continuously. Watch this page or sign-up to this massmessage list to learn about new things you can 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.
Sub-referencing is deployed to German Wikipedia as of September 2025. Our plan is to bring sub-referencing to the other Wikimedia wikis in 2025 and 2026.
Sub-referencing in a nutshell
[edit]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
[edit]- 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.

- 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 be tested on the beta cluster. 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.
Defining a main reference
[edit]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.
Creating a sub-reference for inline references
[edit]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 ==
<references /> <!-- or {{reflist}} -->
|
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 ==
<references /> <!-- or {{reflist}} -->
|
Creating a sub-reference for list-defined references
[edit]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>
|
Re-using a sub-reference
[edit]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 ==
<references /> <!-- or {{reflist}} -->
|
Example – reuse of list-defined sub-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>
|
Converting existing references to sub-references
[edit]Edit the reference which is supposed to become the new main reference by moving details like page numbers to the new details="…"
attribute. Replace similar references with sub-references.
Example: Wikitext without sub-references:
According to scientists,<ref name="Miller">E. Miller, ''The Sun''. New York: Academic Press, 2005. Page 23.</ref> the Sun is pretty big.<ref>E. Miller, ''The Sun''. New York: Academic Press, 2005. Page 30.</ref> In fact, it is very big.<ref>E. Miller, ''The Sun''. New York: Academic Press, 2005. Page 35.</ref> Take their word for it.<ref>E. Miller, ''The Sun''. New York: Academic Press, 2005. Page 48.</ref> Don't look directly at the sun!<ref name="Miller" />
== References ==
<references /> <!-- or {{reflist}} -->
|
Example: Wikitext once references are converted to sub-references
Note that the first reference has been converted to a main reference (including details), the other references have been converted to sub-references. Later iterations of sub-referencing will automatically merge both "Page 23." sub-references as a re-use in the reader's view.
According to scientists,<ref name="Miller" details="Page 23.">E. Miller, ''The Sun''. New York: Academic Press, 2005</ref> the Sun is pretty big.<ref name="Miller" details="Page 30." /> In fact, it is very big.<ref name="Miller" details="Page 35." /> 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 /> <!-- or {{reflist}} -->
|
Nesting sub-references
[edit]It is possible to use nested footnotes with sub-referencing. Multi-level nesting will probably work as well, although it's not actively supported.
Example: Nesting sub-references using {{refn}}
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.{{refn|group="notes"|Some scientists disagree.<ref details="Page 30." name="Miller" />}} Take their word for it.<ref name="Miller" details="Page 48." />.
== Notes ==
<references group="notes" />
== References ==
<references />
|
Keep In Mind
[edit]
- 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
The VisualEditor implementation for sub-references can be tested on the beta cluster. Some details still need to be fixed, other features might evolve after after pilot wiki deployment. 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).
Defining a main reference
[edit]- Use the existing citation dialog to create a main reference that contains the full bibliographic information except for the details (e.g. page numbers) you want to use in sub-references.
Creating a sub-reference
[edit]- Select a re-used reference or create a re-use (either by copy and pasting a reference or by using the re-use citation dialog).
- Click on the "add details" button which appears in the reference popup if the reference is re-used.
- Enter the details of that sub-reference and click apply changes.
Editing a sub-reference
[edit]- 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
[edit]- 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.
Converting existing references to sub-references
[edit]- Select a re-used reference (or create a re-use).
- Click edit, copy the details you want to use for sub-referencing (e.g. the page number) and delete the details to turn the reference into a main reference.
- Click on the "add details" button.
- Paste (or enter) the details you just removed and click "apply changes".
- Replace other similar references with re-uses of the main reference and add details for each of those.
Please note
[edit]- 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, duplicates will automatically be merged in VisualEditor and the reader view.
We've decided to remove the option to create sub-references via the "re-use" tab in the citation dialog for our pilot wiki release, because our user testing indicated it's not very intuitive. We will gather additional feedback after the pilot wiki deployment to check if we should add the option again in later iterations (and if so, how we can improve it).
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.

- 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.
In Progress
[edit]Subreferencing is now ready in Wikitext and VisualEditor and deployed to German Wikipedia to gain new insights for future improvements. Some of our next steps:
- While there are no issues with regular diffs, Visual diffs currently don't display sub-references correctly (phab:T397319).
- Identical sub-references should automatically appear as merged re-uses in the reader's view of the reference list, which still needs to be implemented (phab:T385666).
- VisualEditor edits in articles using sub-references sometimes lead to unexpected changes to the wikitext without effect on the reader's view ("dirty diffs"), e.g. changing the order of
name=...
anddetails=...
(phab:T389363, phab:T403379, phab:T404089). - Newlines within sub-references in wikitext currently don't load in VisualEditor (phab:T390266).
- There are still issues with VisualEditor and
{{Reflist}}
which we need to solve before deploying to projects using similar templates.
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 have deployed sub-referencing in September 2025 to German Wikipedia as our first pilot wiki.
- We are improving sub-referencing and will reach out to other potential pilot wikis in the upcoming months.
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.
- We are planning to deploy the sub-referencing feature to other Wikimedia wikis in 2025 and 2026.
- 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?
[edit]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?
[edit]Yes, you can insert templates in both the main- and the sub-reference. We've initially received feedback suggesting that using templates in an attribute may cause more issues than benefits. Other users explicitly wished for template support, especially in visual editor. Please share your thoughts on sub-references and templates on the talk page.
How will the new feature affect existing gadgets and scripts?
[edit]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?
[edit]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?
[edit]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.