Jump to content

Desejos Técnicos da WMDE/Sub-referências

From Meta, a Wikimedia project coordination wiki
This page is a translated version of the page WMDE Technical Wishes/Sub-referencing and the translation is 20% complete.
Outdated translations are marked like this.
Sub-referências
StatusEm andamento
OriginPesquisa de Aspirações Técnicas 2013, 2015, 2022 e outros
Focus areaFaça a reutilização de referências mais fácil
Phabricatorconselho de projeto
ResponsibleEquipe de Aspirações Técnicas

Diga-nos o que você acha

Nós convidamos você para testar esse recurso, o qual atualizamos continuamente. Vigie esta página ou inscreva-se nesta lista de mensagem para descobrir sobre novas coisas que você pode testar
Leia mais sobre testes e avaliação

Atualmente, não é possível reutilizar a mesma referência com detalhes diferentes de forma fácil em um artigo. Membros da comunidade têm solicitado repetidamente para a MediaWiki, soluções que funcionem sem modelos e sejam baseadas no modo que as referências existentes já funcionam, tanto para o wikitext quanto para o Visual Editor. » Entenda mais sobre o problema

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.

As sub-referências foram implementadas em todas as wikis Wikimedia, com exceção da Wikipédia em Inglês, wikis com leitura de direita para a esquerda e wikis Wikisource até agosto de 2026. Nosso plano é levar as sub-referências para todas as wikis Wikimedia em 2026.

Sub-referências em poucas palavras

Para citar uma fonte mais de uma vez com detalhes diferentes, você precisa de uma referência principal e uma sub-referência.

  • A referência principal contém as principais informações bibliográficas. Na captura de tela abaixo, "1. E. Miller …" na seção Referências representa a referência principal.
  • Uma sub-referêncua define detalhes adicionais, como números de página, capítulos, versos, citações ou marcações de tempo em vídeos. Na captura de tela, "1.1" e "1.2" seguidos por um número de página representam duas sub-referências diferentes.
sub-referências – exemplo
  • Na seção de referências, os leitores veem todas as sub-referências agrupadas abaixo de sua referência principal compartilhada. Isso torna mais fácil entender com que frequência uma única fonte foi citada no artigo.
  • No wikitexto, usa-se um novo atributo para definir os detalhes de uma sub-referência. Chama-se details. Veja abaixo mais informações e exemplos.
  • No Editor Visual, estamos expandindo a caixa de citação existente para que ela suporte sub-referências.

Principais benefícios

  • As sub-referência se baseiam, em grande parte, na forma que as referências já funcionam.
  • Elas foram projetadas para funcionar tanto no Editor Visual quando em wikitexto.
  • A mudança será integrada à extensão Cite do MediaWiki, ficando disponível em todas as wikis da Wikimedia e podendo ser utilizada sem necessidade de predefinições.
  • Sub-references will be properly displayed in Reference Previews and mobile reference pop-ups.
  • É opcional: Você ainda pode usar outros métodos para referenciar. Mas poderá encontrar sub-referências em artigos escritos por outros usuários.
Por favor, diga-nos o que você acha. É importante que este novo recurso não interrompa o trabalho dos usuários, seja intuitivo e funcione bem tanto para usuários de wikitexto quanto de Editor Visual, independentemente do seu nível de experiência ou conhecimento sobre wikitexto e predefinições. Para ter certeza disso, precisamos da sua opinião:

Como funciona

No wikitexto

Benefits specific to wikitext:

  • A solução usa o conceito existente e conhecido de referências nomeadas.
  • Não requer nenhum conhecimento de predefinições.
  • Referências quase duplicadas podem ser removidas do wikitexto, tornando-o mais limpo, menos redundante e mais fácil de ler.

 


 

Definindo uma referência principal

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>

A referência principal pode ser definida em linha (dentro do corpo do artigo) ou na seção de referências.

Criando uma sub-referência para referências em linha

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="p. 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="p. 48." />

Example:

Wikitext Result
According to scientists, the Sun is pretty big. In fact, it is very big.<ref name="Miller" details="p. 23">E. Miller, ''The Sun''. New York: Academic Press, 2005.</ref> Take their word for it.<ref name="Miller" details="p. 48"/>

== Referências ==
<references /> <!-- ou {{reflist}} -->
According to scientists, the Sun is pretty big. In fact, it is very big.[1.1] Take their word for it.[1.2]


Referências
  1. ↑ E. Miller, The Sun. New York: Academic Press, 2005.
    1. ↑ p. 23
    2. ↑ p. 48

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>
<!-- Novas sub-referências: -->
<ref name="Miller" details="p. 23." />
<ref name="Miller" details="p. 48." />

Example:

Wikitext Result
De acordo com os cientistas, o Sol é muito grande.<ref name="Miller">E. Miller, ''The Sun''. New York: Academic Press, 2005.</ref> Na verdade, é muito grande.<ref name="Miller" details="p. 23" /> Acredite na palavra deles.<ref name="Miller" details="p. 48"/>

== Referências ==
<references /> <!-- ou {{reflist}} -->
According to scientists, the Sun is pretty big.[1] In fact, it is very big.[1.1] Take their word for it.[1.2]


Referências
  1. ↑ E. Miller, The Sun. New York: Academic Press, 2005.
    1. ↑ p. 23
    2. ↑ p. 48

Creating a sub-reference for list-defined references

If the main reference is stored in the <references> tag, you don't need to redefine it in-line. Instead, use the following syntax in-line:

<!-- Add this directly to the chosen location in the article text -->
<ref name="Miller" details="p. 23." />

<!-- The list-defined reference stays unchanged: -->
<references>
<ref name="Miller">E. Miller, ''The Sun''. New York: Academic Press, 2005.</ref>
</references>

Example:

Wikitext Result
According to scientists, the Sun is pretty big. In fact, it is very big.<ref name="Miller" details="p. 23" /> Take their word for it.<ref name="Miller" details="p. 48"/>

== References ==
<references>
<ref name="Miller">E. Miller, ''The Sun''. New York: Academic Press, 2005.</ref>
</references>
According to scientists, the Sun is pretty big. In fact, it is very big.[1.1] Acredite na palavra deles.[1.2]


Section
  1. ↑ E. Miller, The Sun. New York: Academic Press, 2005.
    1. ↑ p. 23
    2. ↑ p. 48

Note that we recommend against using {{reflist|refs=...}} for list-defined references as it causes issues for VisualEditor users.

Re-using a 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.
  • 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:

Wikitext Result
According to scientists, the Sun is pretty big.<ref name="Miller" details="p. 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="p. 48"/> Don't look directly at the sun!<ref name="Miller" details="p. 23" />

== References ==
<references /> <!-- or {{reflist}} -->
According to scientists, the Sun is pretty big.[1.1] In fact, it is very big. Acredite na palavra deles.[1.2] Don't look directly at the sun![1.1]


Section
  1. ↑ E. Miller, The Sun. New York: Academic Press, 2005.
    1. ↑ a b p. 23
    2. ↑ p. 48

Example – reuse of list-defined sub-references:

Wikitext Result
According to scientists, the Sun is pretty big.<ref name="Miller" details="p. 23" /> In fact, it is very big. Take their word for it.<ref name="Miller" details="p. 48"/> Don't look directly at the sun!<ref name="Miller" details="p. 23" />

== References ==
<references>
<ref name="Miller">E. Miller, ''The Sun''. New York: Academic Press, 2005.</ref>
</references>
According to scientists, the Sun is pretty big. In fact, it is very big.[1.1] Acredite na palavra deles.[1.2] Don't look directly at the sun![1.1]


Section
  1. ↑ E. Miller, The Sun. New York: Academic Press, 2005.
    1. ↑ a b p. 23
    2. ↑ p. 48

Converting existing references to sub-references

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:

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

== References ==
<references /> <!-- or {{reflist}} -->
According to scientists,[1] the Sun is pretty big.[2] In fact, it is very big.[3] Acredite na palavra deles.[4] Don't look directly at the sun![1]


Section
  1. ↑ a b E. Miller, The Sun. New York: Academic Press, 2005, p. 23
  2. ↑ E. Miller, The Sun. New York: Academic Press, 2005, p. 30.
  3. ↑ E. Miller, The Sun. New York: Academic Press, 2005, p. 35.
  4. ↑ E. Miller, The Sun. New York: Academic Press, 2005, p. 48.

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.

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

== References ==
<references /> <!-- or {{reflist}} -->
According to scientists,[1.1] the Sun is pretty big.[1.2] In fact, it is very big.[1.3] Acredite na palavra deles.[1.4] Don't look directly at the sun![1.1]


Section
  1. ↑ E. Miller, The Sun. New York: Academic Press, 2005.
    1. ↑ a b p. 23
    2. ↑ p. 30
    3. ↑ p. 35
    4. ↑ p. 48

Nesting sub-references

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}}

Wikitext Result
According to scientists, the Sun is pretty big.<ref name="Miller" details="p. 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="p. 30." name="Miller" />}} Take their word for it.<ref name="Miller" details="p. 48"/>

== Notas ==
<references group="notes" /> <!-- ou {{reflist|group=notes}} -->

== Referências ==
<references /> <!-- ou {{reflist}} -->
According to scientists, the Sun is pretty big.[1.1] In fact, it is very big.[notes 1] Acredite na palavra deles.[1.3]


Notas
  1. ↑ Some scientists disagree.[1.2]
Referências
  1. ↑ E. Miller, The Sun. New York: Academic Press, 2005.
    1. ↑ p. 23
    2. ↑ p. 30.
    3. ↑ p. 48

Predefinições e sub-referências

Templates can be used within sub- and main references just as with regular references.

Example: Sub-references using the example template {{Subref}}

Wikitext Result
According to scientists, the Sun is pretty big.<ref name="Miller" details="{{Subref|page=23|quote=It's soo big}}">{{Cite book |last=Miller |first=E. |title=The Sun |publisher=Academic Press |location=New York |date=2005}}</ref> In fact, it is very big. Take their word for it.<ref name="Miller" details="{{Subref|page=48}}" /> Don't look directly at the sun!<ref name="Miller" details="{{Subref|page=50|quote=Don't do it}}" />

== References ==
<references /> <!-- or {{reflist}} -->
According to scientists, the Sun is pretty big.[1.1] In fact, it is very big. Acredite na palavra deles.[1.2] Don't look directly at the sun![1.3]


Section
  1. ↑ Miller, E. (2005). The Sun. New York: Academic Press. 
    1. ↑ p. 23 "It's soo big"
    2. ↑ p. 48
    3. ↑ p. 50 "Don't do it"

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 " within details="…" (e.g. when inserting a quote), make sure to use &quot; 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 with details="…" 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

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

  • 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

  • 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

  • Click on the footnote marker in the article text and select the second edit button (the pen icon) 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.

Converting existing references to sub-references

  • 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.

Templates and sub-references

Templates can be used within sub- and main references just as with regular references.

  • Click on the "add details" button.
  • Use the "insert" button to choose a template.
  • Use the template dialog to search for the desired template.
  • Fill out the template parameters and insert the template.
  • The sub-reference is now displayed with the template.

Please note


 Test the feature

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.

Test on testwiki Leave feedback Book a call

In Progress

Sub-referencing is now ready in Wikitext and VisualEditor and deployed to all Wikimedia wikis. Some of our next steps:

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.

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.

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}}:

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:

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.

Mudanças recentes e próximos passos

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

  • Green tickY We have deployed sub-referencing in September 2025 to German Wikipedia as our first pilot wiki.
  • Green tickY Read more about our learnings and observations from three months of sub-referencing on German Wikipedia.
  • Green tickY We have deployed sub-referencing to nine additional pilot wikis in February 2026, including Polish and Swedish Wikipedia. (phab:T418209)
  • Green tickY We have deployed sub-referencing to Czech and Italian Wikipedia in April 2026. (phab:T420938)
  • Green tickY We have deployed sub-referencing to French Wikipedia and most non-Wikipedia wikis in June 2026. (phab:T425662)
  • Green tickY We have deployed sub-referencing to Azerbaijani, Catalan, Dutch, Portuguese and Spanish Wikipedia and many smaller Wikipedia language versions in June 2026. (phab:T428902)
  • Green tickY We have deployed sub-referencing to Finnish, Greek, Hungarian, Thai and Turkish Wikipedia in July 2026. (phab:T430941)
  • Green tickY We have deployed sub-referencing to Chinese, Indonesian, Japanese, Korean, Russian, Simple, Ukranian and Vietnamese Wikipedia in August 2026. (phab:T432731)
  • Green tickY We have deployed sub-referencing to English Wikipedia in October 2026. (phab:T440243)
  • Green tickY We have deployed sub-referencing to all WMF wikis in November 2026. (phab:T440304)
  • We are continuously improving the feature and implementing community feedback.

Next Steps

The Technical Wishes team’s focus remains on completing the sub-referencing feature.

  • Check our report for our roadmap for upcoming improvements to sub-referencing.
  • We will continue to collect feedback to improve the feature after the global deployment.

Archived updates from 2025

  • Green tickY 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.
  • Green tickY 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.
  • Green tickY 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.
  • Green tickY We have deployed sub-referencing in September 2025 to German Wikipedia as our first pilot wiki.
  • Green tickY We are improving sub-referencing and will reach out to other potential pilot wikis in the upcoming months.

Archived updates from 2024

  • Green tickY 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.
  • Green tickY 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.
  • Green tickY Our team presented sub-referencing at Wikimania 2024 and discussed with participants. (YouTube)
  • Green tickY 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

Como posso encontrar artigos que usam sub-referências?

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.

Also, the team has created a number of examples on testwiki.

Can I insert a template into the details attribute?

Yes, you can insert templates in both the main- and the sub-reference, see our examples for wikitext and VisualEditor. 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 can I prepare for the deployment of sub-referencing?

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.

Wikis that host a copy of the Reference Tooltips gadget are asked to update their version – typically located at MediaWiki:Gadget-ReferenceTooltips.js – as shown here. See phab:T416304 for more information.

Wikis that host a copy of Navigation popups might want to take a look at English Wikipedia's gadget update to fully support sub-referencing.

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.

Por que essa opção foi escolhida para o wikitexto?

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.

Can I use sub-references for details other than page numbers?

Yes you can, the feature is intentionally designed to allow other types of details, e.g. chapters, quotes or audio timestamps. We've selected a variety of different examples from German Wikipedia in our pilot wiki report.

Por que demorou tanto para encontrar uma solução?

A equipe de Desejos Técnicos trabalhou nesse recurso de vez em quando por muitos anos. Se você quiser saber mais, aqui está uma visão geral do histórico e da complexidade desse problema.