Jump to content

WMDE Technical Wishes/Sub-referencing/arz

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 12% complete.
Outdated translations are marked like this.
الاشاره الفرعيه
Statusفى التقدم
Originاستطلاع امنيات فنيه 2013، 2015، 2022 و غيرها
Focus areaخلى اعادة استخدام المراجع اسهل
Phabricatorلجنة المشروع
Responsibleفريق النيه اللى عايز

قوللنا ايه رايك

بندعوك لاختبار النموذج الاولى الخاص بينا, و اللى بنحدثه باستمرار. شوف الصفحه دى او سجل فى قايمة الرسائل الجماعيه دى لمعرفة المزيد عن الحاجات الجديده اللى ممكن تجربها
اقرا اكتر عن الاختبار و الردود

دلوقتى, مش ممكن اعادة استخدام نفس المرجع بسهوله مع تفاصيل مختلفه فى مقاله. طلب ​​اعضاء المجتمع اكتر من مره حل عشان MediaWiki يشتغل بدون قوالب و يستند للطريقه الحاليه اللى بتشتغل بيها مصادر wikitext و Visual Editor. » اعرف اكتر عن المشكله

كجزء من مجال التركيز "خلى استخدام مصادر اسهل", فريق الرغبات الفنيه فى ويكيميديا ​​المانيا بيقدم ميزه "الاحاله الفرعيه" - و هيا ميزه اختياريه بتسمحلك بارفاق تفاصيل مختلفه بسهوله بمرجع موجود, بدون الحاجه لتكراره.

Our plan is to bring Sub-referencing to the Wikimedia wikis in 2025.

الاشاره الفرعيه باختصار

عشان تنقل مصدر اكتر من مره مع تفاصيل مختلفه، لازم يكون فيع مرجع رئيسى و مرجع فرعى.

  • المرجع الرئيسى بيحتوى على المعلومات الببليوجرافيه الرئيسيه.
  • المرجع الفرعى بيحتوى على التفاصيل: ارقام الصفحات, او اى نوع من المعلومات الاضافيه اللى بتختلف لكل استشهاد, زى الفصول او الآيات او الملاحظات.
  • 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.
sub-referencing – example


  • فى قسم مصادر, القراء بيشوفة كل المصادر الفرعيه مجمعه مع بعض اسفل مرجعهم الرئيسى. و دا بيخلى من السهل فهم عدد المرات اللى تم فيها الاستشهاد بمصدر واحد فى المقاله.

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.

فى المحرر المرئى, بنغيير مربع حوار الاقتباس الحالى عشان يدعم المصادر الفرعيه.

المنافع الرئيسيه

  • Sub-referencing is largely based on the existing way references work.
  • It's designed to work for both Visual Editor and wikitext.
  • الحل هيدمج فى ميديا ويكى، و يبقى متاح على كل ويكى ويكيميديا و ممكن استخدامه بدون حلول مبنيه على القوالب.
  • هيتم عرض المصادر الفرعيه بشكل صحيح فى معاينات مصادر و النوافذ المنبثقه للمصادر على الهاتف المحمول.
  • ده اختيارى: ممكن تستخدم اساليب تانيه للاشاره. بس ممكن تلاقى الاشارات الفرعيه فى المقالات اللي كتبها مستخدمين تانيين.

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 Visual Editor users regardless of their experience level or knowledge about wikitext and templates. To make sure of that, we need your feedback:

بشتغل ازاى

فى ويكيتكست

تقريبا خلص الشغل فى حل wikitext للاشاره الفرعيه. لكن ممكن يتغير اسم الخاصيه. الحل ما اتنشرش لسا فى الغالب لاننا عاوزين تجنب حصول مستخدمى Visual Editor على تجربه مختلفه تماما عن مستخدمين wikitext. لا يزال دعم Visual Editor قيد التطوير.

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

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

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

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 while this is not a pure reuse like you are used to with main references and does create duplicates in wikitext, in the reader and Visual Editor view, identical statements will be merged to prevent unnecessary duplication in the rendered output. This is still work in progress.
  • The same re-use statement applies for list-defined and inline main references.
  • Tip: Copying and pasting an existing sub-reference statement remains a simple and recommended approach.

Example Usage for Reuse of Inline 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 Usage for 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 " within details="…" (e.g. when inserting a quote), make sure to use &quot; instead, or delimit the details with single quotes. Visual Editor 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 Visual Editor which we cannot solve at this point in time.


In Visual Editor (in development)

We are actively refining the user experience and workflows for Sub-referencing in Visual Editor. Currently, there is one entry point via the “re-use” tab for creating a sub-reference, but the solution for Visual Editor is expected to evolve in the coming months.

You can also test the prototype with the current state of the Visual Editor solution. Please keep in mind that it will likely change. As always, we will keep you and these project pages updated as Visual Editor gains more capabilities and let you know when we need your feedback!

Benefits specific to Visual Editor

  • 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 Visual Editor (as opposed to template-based workarounds). You can create them via the citation dialog and you can edit them from within the references section.

 


 

Workflows in the current prototype (likely to change)

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.
    400
  • The reference popup in Visual Editor shows you that this reference is a sub-reference, and how often it is re-used.

Editing an existing sub-reference

  • Click on the footnote marker in the article text to edit a sub-reference.
  • You can now change the details of the sub-reference. You are also informed that it is a sub-reference.
  • You cannot edit a sub-reference from the reference list yet.
  • To edit the main reference, click on it in the references section.

Re-using a sub-reference

  • You can re-use a sub-reference using the "re-use" tab in the citation dialog.

Please note

  • The existing behavior of creating automatic names for references in Visual Editor also occurs with sub-referencing.
  • We are actively working on creating an even more intuitive user experience for Visual Editor. What you see now is just the beginning, it will be refined and improved over time.
  • We have yet to work on what happens when you delete a reference that is being re-used.
  • Currently, if you re-use a sub-reference it will show as a duplicate in the reference list. Once the Visual Editor's UX has evolved, the duplicates will automatically be merged in Visual Editor 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.

The prototype is available on beta wiki. Currently, we primarily invite you to test the wikitext solution:

Test on beta wiki Leave feedback


Please note that beta wikis are a bit different from your regular 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 (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 Visual Editor

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 Visual Editor 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 Visual Editor

If you want to re-use an existing reference with different details in Visual Editor, 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 Visual Editor and wikitext users is very different.
  • Most workarounds for reusing references with different details don’t work properly in Visual Editor.
  • 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 March 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.

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 Visual Editor workflows.
  • Once the development has reached a stable state, we will reach out to 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

  • Green tickY A prototype is available on beta wiki. It covers the wikitext solution and some of the basic features of the Visual Editor 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

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 Visual Editor’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 Visual Editor.

Furthermore, we’re confident that this approach will work consistently across Visual Editor 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.