WMDE Technical Wishes/Sub-referencing/zh: Difference between revisions
Created page with "==== 具体优势 ====" |
Created page with "* 该解决方案基于已知的命名引用概念。 * 不需要任何模板知识。 * 可以删除维基文本中近似重复的引用,使其更简洁、减少冗余文字、并更易于阅读。" |
||
Line 62: | Line 62: | ||
==== 具体优势 ==== |
==== 具体优势 ==== |
||
* 该解决方案基于已知的命名引用概念。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
* 不需要任何模板知识。 |
|||
* The solution is based on 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. |
|||
</div> |
|||
|
|
||
---- |
---- |
Revision as of 12:44, 22 August 2024
子引用 | |
---|---|
Status | 进行中 |
Origin | 技术愿望调查2013,2015,2022和其他。 |
Focus area | 使得再次引用更容易 |
Phabricator | 项目告示板 |
Responsible | 技术愿望團隊 |
告诉我们您的想法 我们邀请您测试我们在不断更新的原型。 請观看本页面或是注册本消息列表以了解可供您测试的新内容 |
目前,你無法在同一篇文章中輕易地再次使用同一個不同细节的参考资料。社群成员已多次要求一种无需模板的解决方案,该解决方案应基于维基文本和可视化编辑器的现有引用方式。 » 了解关于该问题的更多内容
作为"使得再次引用更容易"这一重点领域的一部分,维基媒体德国的技术愿望团队正在引入子引用--这是一项可选功能,可以让您轻松地将不同的细节附加到现有参考资料上,而无需复制它。
我们的计划是在2024年底将子引用功能引入维基媒体的各个维基中。
简要介绍
要多次引用同一来源并附上不同的细节,您需要一个主引用和一个子引用。
- 主引用包含主要的书目信息。
- 子引用包含细节信息:页码或每次引用时不同的附加信息,例如章节、段落或注释。
- 在参考文献部分,读者可以看到所有子参考文献都分组在它们的主参考文献之下。这便于读者理解单个来源在该文章中被引用的频率。
- 对于 维基文本,你可以使用一个新的属性来进行子引用。该属性目前的名称是“extends”,但在该功能正式部署之前,名称可能会有所变更。我们会收集更多关于该名称的反馈意见。
- 在可视化编辑器中,我们正在更改现有的引用对话框,使其支持子引用。
主要优点
- 子引用建築於目前的引用方式之上。
- 它同时适用于可视化编辑和源代码编辑 - 使我们更接近可视化编辑和源代码编辑之间的功能平等。
- 该解决方案将集成到 MediaWiki 中,因此可在所有维基媒体维基中使用,而且无需基于模板。
- 子引用可正确显示参考参考文献预览窗口,并且预览框在移动端也可以正常弹出。
- 可选项:您仍然可以使用其他方法进行引用。 但您可能会在其他用户撰写的文章中遇到子引用。
Please tell us what you think. It is important that this new feature does not interrupt user workflows, is intuitive and 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:
- 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.
工作原理
在维基文本中使用
The wikitext solution for sub-referencing is nearly done. However, the name of the attribute might change. The solution has not been deployed yet mostly because we want to avoid that Visual Editor users have a vastly different experience than wikitext users. The Visual Editor support is still in development.
你仍可測試原型,與告訴我們你的想法。
具体优势
- 该解决方案基于已知的命名引用概念。
- 不需要任何模板知识。
- 可以删除维基文本中近似重复的引用,使其更简洁、减少冗余文字、并更易于阅读。
Step by step
1) You need a reference with the main bibliographic information, the main reference. This reference needs a name:
<ref name="Miller">E. Miller, ''The Sun''. New York: Academic Press, 2005.</ref>
This main reference should be placed in the references section, or else you will have a reference in the article that does not show any details like page numbers. In the references section, use the syntax <references> … </references>
. If the article is already using <references />
, remove it.
2) You create a sub-reference, using the name of the main reference with the attribute extends. You add the details between the <ref>
tags:
<ref extends="Miller">Page 23.</ref>
这是它的外观:
According to scientists, the Sun is pretty big.<ref extends="Miller">Page 23.</ref> In fact, it is very big. Take their word for it.<ref extends="Miller">Page 48.</ref> Don't look directly at the sun!<ref extends="Miller">Page 23.</ref>
==References==
<references >
<ref name="Miller">E. Miller, ''The Sun''. New York: Academic Press, 2005.</ref>
</references>
|
如果您要在 wikitext 中使用子引用以引用新来源,只需确保在引用部分创建主引用即可。
但在很多情况下,您可能希望使用子引用来引用文章中已经存在的参考资料。 在这种情况下
- 使用
<ref name>
将原始参考文献转化为主参考文献。 - 将主参考文献移至参考文献部分。
- 在文章中原始参考文献的位置创建子参考文献。
- 将主参考文献的详细信息(页码等)移至子参考文献中。确保它们不再保留在主参考文献中,否则这些细节将显示两次。
- 在文章中需要引用不同细节出处的地方创建更多的子参考文献。
您还可以通过给子引用命名来重复使用子引用本身
According to scientists, the Sun is pretty big.<ref extends="Miller" name="Miller, 23">Page 23.</ref> In fact, it is very big. Take their word for it.<ref extends="Miller">Page 48.</ref> Don't look directly at the sun!<ref name="Miller, 23" />
==References==
<references >
<ref name="Miller">E. Miller, ''The Sun''. New York: Academic Press, 2005.</ref>
</references>
|
请注意
- Converting references to main and sub-references requires some clean-up; and the main reference typically needs to be in the references section (as described above).
- You can use sub-referencing with citation templates. We’ve tested the most commonly used ones, but your favorite template might need some updates in order to work with our solution.
- Some gadgets/scripts related to references might also need an update in order to properly work with the new sub-referencing solution.
- 不可能对子引用进行子引用。
- If
<ref group>
is used, the main reference and the sub-reference need to be in the same group.
在可视化编辑器中(开发中)
At this point, we don’t know exactly what the feature for Visual Editor will look like. So far, we have a very minimal solution that is not yet ready to be deployed. In the upcoming weeks, this solution will most likely change.
You can also test the prototype with the current state of the Visual Editor solution. Please keep in mind that it will likely change. We will update this page when new aspects can be tested.
可视化编辑特有的优势
- 若要引用同一资料来源的不同细节,您不必再从头开始创建新的引用。
- 子引用与可视化编辑器完全兼容(而非基于模板的变通方法): 您可以通过引文对话框创建子引用,也可以在参考文献部分编辑子引用。
Workflows in the current prototype (likely to change)
创建子引用
- 目前可通过现有的引用对话框创建子引用。
- 在 "扩展 "选项卡中选择要重复使用的引用。该选项卡可能会在我们目前的用户测试环节后得到改进。
- 输入子引用的详细信息,然后单击插入。
- 在可视化编辑器中,引用弹出窗口会显示该参考文献是一个子引用,并显示其被重复使用的次数。
编辑现有的子引用
重用一个子引用
请注意
- The existing problem with auto-names for references in Visual Editor also occurs with sub-referencing.
- 在可视化编辑器中,目前可以对子引用创建子引用。这是一个错误,并在保存时会导致错误。这不应用于实际解决方案,在wikitext中也无法正常工作。
- 我们尚未处理删除一个被重复使用的引用时会发生的情况。
- 将现有引用转换为主引用和子引用的工作流程尚未定义。
- When you create a re-use of a sub-reference in Visual Editor and then switch to wikitext, you will find that the statement in wikitext is
<ref extends="main-reference" name="sub-reference" />
. This is a bug and will be fixed as part of T367749. <ref name="sub-reference name"/>
currently does not show the Reference Preview for the sub-reference properly in Visual Editor editing mode. You will only see the sub-reference's details in the pop-up and not the information from the main reference. To see the main reference's information in the pop-up as well, you should currently use the syntax<ref extends="main" name="sub-reference name" />
.
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:
- 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 de-betawiki) – or display your IP address (on en-betawiki).
我们正在解决的问题
In Wikipedia articles, it is 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.
-
Wikitext: <ref name> in the article text
-
Wikitext: <ref name> in the references section
-
Visual Editor: 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 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}}:
-
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 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.
近期的改变和下一部计划
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.
- 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.
- Users across different projects are currently participating in moderated user testing.
- We will send out announcements across all wikis to let communities know about this upcoming feature, and invite them to test and give feedback.
- We have multiple questions and assumptions we need to test before moving to the next stage of development. Please check the feedback section where we will frequently raise current questions.
- We will reach out to potential pilot wikis soon and hopefully deploy to pilot wikis by end of September.
- Our plan is to deploy the sub-referencing feature for wikitext and Visual Editor by the end of 2024.
- 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.
常见问题
How can I find articles that use sub-referencing?
A tracking category called Category:Pages that use extended 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.
Can I use this feature with citation templates/tools?
Yes, you can use sub-referencing with citation templates. We’ve tested the most common citation templates (e.g. cite book or cite web) and don’t expect any issues. But your favorite template might need some updates in order to work with our solution. Some gadgets/scripts related to references might also need an update in order to properly work with the new sub-referencing solution. Because templates, 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.
You are also invited to come to our Wikimania workshop "A brand new citation option – What does this mean for citation templates?" (hybrid) or watch the recording later.
What will the name of the sub-reference attribute be?
We don’t know yet. Currently, the attribute name for creating sub-references in wikitext is extends
. We decided on this name some years ago after discussing with communities and stakeholders at the Wikimedia Foundation. However, we have received some feedback that this name might not be the best option. Before we will deploy this feature to the wikis, we want to get more feedback on the attribute name and are planning to put some alternatives up for discussion. We’ll let you know when that happens.
Why did you choose this wikitext syntax?
When we first started working on the wikitext implementation of this feature, we discussed different options. Adding a new tag (e.g. <subref>
) was discussed carefully, but we wanted to stick to the existing <ref>
approach, to minimize the amount of new syntax users have to learn. Besides, introducing a new tag would require many updates to existing community software (tools, gadgets, bots etc.) for referencing.
One proposal (from 2008) was to specify the subreference’s details within the <ref>
tag: <ref page="page 2" name="Miller">
or later <ref detail="page 2" name="Miller">
using the name attribute to refer to the main reference. This is similar to what users know from working with templates like {{cite book}}.
The main issue with this approach is, however, that it causes problems with templates and is very likely to cause errors. Another problem with this syntax is that it does not allow to re-use a sub-reference, because the name attribute has already been used to refer to the main reference and cannot be used a second time.
A way to avoid both these issues is to create a new reference attribute and put the sub-reference’s details in the area between the opening and closing <ref>
tags, the same way it is already done for the content of references. This is what our approach does.
为什么找到解决方案花了这么长时间?
技术愿望团队在这个功能上断断续续工作了很多年。如果你想了解更多信息,请参阅问题的历史和复杂性概览。