WMDE Technical Wishes/Sub-referencing/yue
目前,唔可能喺一篇文章入面輕易「重用同一個參考資料,但係有啲唔同嘅細節」。社群成員一再要求一個 mediawiki 解決方案,呢個解決方案唔需要範本,而且係基於現有嘅參考工作方式,適用返於 wikitext 同埋 Visual Editor 。 »了解多啲有關呢個問題嘅資訊
子參考 | |
---|---|
Status | 進行緊 |
Origin | 技術願望調查2013, 2015, 2022同埋其他 |
Focus area | 令重用參考文獻仲容易啲 |
Phabricator | 項目板 |
Responsible | 技術願望團隊 |
![]() 話畀我哋知你諗緊啲乜 我哋邀請你嚟「測試我哋嘅原型」,我哋會不斷更新緊。 監視 呢個頁面定係 申請呢個大量訊息清單 去學習並測試埋多啲新嘅嘢 |
作為重點領域嘅一部分「令重複噉使用返晒啲參考資料更加容易」, 維基媒體德國嘅技術願望團隊引入緊「子參考」 - 呢個係一個可選功能,令你可以輕鬆噉將唔同嘅細節附加到現有嘅參考,而唔使重複佢。
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.
- 喺參考文獻部分,「讀者」會睇到所有子參考文獻喺佢哋嘅主要參考文獻下面分組埋一齊。噉樣就可以更容易掌握嗰篇文章入面引用咗單一來源嘅頻率。
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.
- 呢個解決方案將會整合到 MediaWiki 入面,所以可以喺所有維基媒體維基入面使用,而且唔需要基於模板嘅解決方法就可以使用。
- 子參考資料會喺參考資料預覽同埋流動參考資料彈出式視窗入面正確顯示。
- 呢個係選擇性嘅:你仍然可以用其他方法嚟參考。但係你可能會喺其他用戶寫嘅文章入面遇到子引用。
- 測試原型! 閱讀更多有關點樣測試嘅資訊 。
- 喺 討論頁 提供一般意見。
- [1] 呢個頁面或者申請呢個大量訊息清單 去學習你可以測試嘅新嘢。
佢點樣運作
喺Wikitext入面
子引用嘅維基文字解決方案就快完成喇。不過,個屬性嘅名稱 可能會改變。呢個解決方案仲未部署,主要係因為我哋想避免 Visual Editor 用戶嘅體驗同 wikitext 用戶有好大分別。 支援視覺編輯器仲係開發緊。
維基文字專用嘅好處
- 解決方案係基於現有同已知嘅命名參考概念。
- 唔需要任何範本知識。
- 可以喺維基文字入面移除幾乎重複嘅參考,令到佢更乾淨、更少多餘同埋更易閱讀。
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
"
withindetails="…"
(e.g. when inserting a quote), make sure to use"
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 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 Visual Editor which we cannot solve at this point in time.
喺視覺編輯器(開發緊)
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!
維基文字專用嘅好處
- 要引用同一個來源同唔同嘅細節,你唔使再由頭開始建立新嘅參考文獻。
- 子參考文獻同 Visual Editor 完全兼容(而唔係基於模板嘅解決方法):你可以透過引文對話方塊建立佢哋,亦可以喺參考文獻部分入面編輯佢哋。
目前原型嘅工作流程(可能改變得)
建立子參考
- 目前可以透過現有嘅引文對話方塊嚟建立子參考文獻。
- 喺「延伸」標籤入面,揀返你想重用嘅參考資料。呢個分頁可能會喺我哋而家嘅用戶測試工作階段之後得到改善。
- 輸入嗰個子參考嘅詳情,然後撳插入。
- Visual Editor 入面嘅參考彈出式視窗會顯示呢個參考係子參考,同埋重複使用嘅頻率。
建立子參考
- 撳一撳吓佢文章文字入面嘅腳註標記嚟編輯子參考文獻。
- 你而家可以更改子參考嘅詳情。你亦都會收到通知,佢係一個子參考資料。
- 你仲未可以喺得參考文獻清單入面編輯子參考文獻。
- 如果要編輯主要參考文獻,喺參考文獻部分撳一撳吓佢。
建立子參考
請注意
- 現有問題喺視覺編輯器入面用自動名稱嚟參考,亦都會喺子參考嗰陣出現。
- 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.
- 我哋仲未處理到當你刪除重複使用緊嘅參考資料嗰陣會發生咩事。
- 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.
測試個原型
我哋需要你嘅意見嚟確保我哋建立啱嘅嘢。歡迎喺呢個項目嘅 討論頁提供意見或者問題。
原型可以喺測試版 wiki 上面搵到。目前,我哋主要邀請你測試 wikitext 解決方案:
- 佢哋可能睇落唔同(例如唔用你鍾意嘅背景)。
- 佢哋可能會提供一啲仲喺測試緊嘅新功能。
- 佢哋只係包含一啲測試頁面同範本,而唔係你嘅整個 wiki 內容,亦都唔係你習慣嘅所有範本、模組、小工具等等。
- 你嘅常規維基媒體登入喺測試版維基上面唔適用。你可以註冊一個帳戶 - 確保用同你一般嘅維基媒體帳戶唔同嘅密碼 - 或者喺冇帳戶嘅情況下測試呢個功能,噉樣會導致建立一個臨時帳戶 (喺de-betawiki上面) – 或者顯示你嘅 IP 位址(喺en-betawiki上面)。
我哋解決緊嘅問題
喺維基百科嘅文章入面,通常會多次參考一個來源。但係雖然你可以「完全按照原樣」重複使用參考文獻,但係你宜家唔可以用「唔同嘅詳情」(例如唔同嘅頁號)重複使用同一個參考文獻。你唯一嘅選擇就係建立一個全新嘅參考資料或者使用解決方法。
現狀:重用維基文字同視覺編輯器入面嘅參考資料
如果你想重用 wikitext 入面嘅參考,你可以將佢變成 命名參考,然後喺文章嘅另一個地方參考嗰個名。命名嘅參考文獻可以放喺文章文字或者參考文獻部分。喺視覺編輯器入面,你可以用引文對話框入面嘅「重用」選項。喺參考文獻部分,同名嘅參考文獻會分組埋一齊。
-
維基文字:文章文字入面嘅<ref name>
-
維基文字:參考文獻部分入面嘅<ref name>
-
視覺編輯器:引文對話框
-
讀者睇法
現狀:重用維基文字入面有唔同詳情嘅參考文獻
如果你想喺 wikitext 入面重用一個有唔同詳情嘅現有參考,你而家需要複製同貼上現有嘅參考,然後更改重複嘅詳情,或者由頭開始建立一個新嘅(幾乎相同)嘅參考。有啲項目會用短引文之類嘅解決方法,或者縮短腳註之類嘅基於模板嘅解決方案。喺參考文獻部分,原始參考文獻同你建立嘅新參考文獻唔會分組埋一齊。
-
維基文入面有兩個幾乎相同嘅參考文獻。
-
讀者嘅睇法:幾乎相同嘅參考文獻唔會分組埋一齊
-
喺維基文字入面用短引文嘅解決方法
-
讀者嘅觀點:用短引文嘅解決方法
-
用維基文字入面嘅{{sfn}}解決方法
-
讀者嘅睇法:用 {{sfn}} 解決方法
現狀:重用維基文字入面有唔同詳情嘅參考文獻
如果你想喺 Visual Editor 重用現有嘅參考文獻,但係有唔同嘅細節,揀返引文對話方塊入面嘅「重用」 同埋複製貼上方法都唔會運作,因為兩者都會導致「相同」會重複使用,而改變重複使用/複製咗嘅參考資料嘅詳情會改變嗰個參考資料嘅「兩個」實例。相反,你需要由頭開始建立一個新嘅(幾乎相同)參考資料。喺參考文獻部分,原始參考文獻同你建立嘅新參考文獻唔會分組埋一齊。
由基於模板嘅解決方法(例如 {{sfn}} )建立嘅參考文獻唔可以喺參考文獻部分入面編輯,亦都唔會顯示喺引文重用標籤入面;但係喺文章文字入面搵到佢哋嗰陣,可以手動編輯佢哋。
用 $ code 解決方法:
-
讀者睇法
-
撳一下「編輯」嗰陣,參考文獻就會喺參考文獻部分消失。
-
唔可以透過「重用」對話框使用{{sfn}}嘅參考資料。
-
淨係喺得文章文字入面搵到參考文獻嗰陣先可以編輯參考文獻
讀者嘅問題
基於範本嘅解決方法喺參考預覽、參考工具提示同埋流動參考彈出式視窗入面唔會正確顯示。
$Code解決方法,預覽參考資料:
現狀嘅主要問題
- 視覺編輯器同維基文字用戶嘅體驗係好唔同嘅。
- 大部分重用唔同細節嘅參考嘅解決方法喺 Visual Editor 入面都唔會正常運作。
- 建立好多幾乎相同嘅參考文獻,但係細節唔同,令到維基文字更長,亦可能更難閱讀。
- 基於範本嘅解決方法唔係所有社群都平等接受,所以唔係全球可用。
- 有啲用戶試圖避免呢個問題,將來源放入參考文獻部分,而完全唔用佢哋做參考,令到驗證文章嘅部分更加難。
最近嘅變動同下一步
我哋嘅團隊已經斷斷續續噉解決咗呢個問題一段時間。 呢度係呢個項目嘅歷史概覽,包括我哋嘅研究。
多謝晒所有參與測試同面試同埋表現出興趣嘅人,同埋所有多年來抽空喺我哋嘅討論頁面留言嘅人。呢個係深入啲嘅欣賞。如果你有多啲意見,請喺討論頁度分享。
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
- 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.
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.
我哋知道重點領域「重用參考文獻」嘅其他問題,我哋會嘗試一路解決晒佢哋。 但係,我哋嘅重點仍然係創造一個子參考嘅解決方案。
Archived updates from 2024
- 「原型」可以喺測試版 wiki 上面搵到。 佢涵蓋咗維基文字解決方案同埋視覺編輯器解決方案嘅一啲基本功能。 你可以持續測試原型同埋提供意見。
- 我哋會喺所有 wiki 上面發出公告,話畀社群知呢個即將推出嘅功能,同埋邀請佢哋測試同埋提供意見。
- 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.
- 我哋會繼續收集緊啲意見,喺部署之後改善解決方案。
常見問題
我點樣可以搵到用子參考嘅文章?
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.
點解你揀呢個維基文語法?
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.
點解要咁耐先搵到個解決方法?
技術願望團隊已經斷斷續續噉研究咗呢個功能好多年。 如果你想知多啲,呢度有個問題嘅歷史同複雜性概覽