WMDE Technical Wishes/Sub-referencing/zh

This page is a translated version of the page WMDE Technical Wishes/Sub-referencing and the translation is 84% complete.

目前,你無法在同一篇文章中輕易地再次使用同一個不同细节的参考资料。社群成员已多次要求一种无需模板的解决方案,该解决方案应基于维基文本和可视化编辑器的现有引用方式。 » 了解关于该问题的更多内容

子引用
Status进行中
Origin技术愿望调查201320152022其他
Focus area使得再次引用更容易
Phabricator项目告示板
Responsible技术愿望團隊

告诉我们您的想法

我们邀请您测试我们在不断更新的原型。 請观看本页面或是注册本消息列表以了解可供您测试的新内容
了解更多有关测试和反馈的信息

作为"使得再次引用更容易"这一重点领域的一部分,维基媒体德国的技术愿望团队正在引入子引用--这是一项可选功能,可以让您轻松地将不同的细节附加到现有参考资料上,而无需复制它。

我们的计划是在2024年底将子引用功能引入维基媒体的各个维基中。

简要介绍

要多次引用同一来源并附上不同的细节,您需要一个主引用和一个子引用。

  • 主引用包含主要的书目信息。
  • 子引用包含细节信息:页码或每次引用时不同的附加信息,例如章节、段落或注释。

 

  • 在参考文献部分,读者可以看到所有子参考文献都分组在它们的主参考文献之下。这便于读者理解单个来源在该文章中被引用的频率。
  • 对于 维基文本,你可以使用一个新的属性来进行子引用。该属性目前的名称是“extends”,但在该功能正式部署之前,名称可能会有所变更。我们会收集更多关于该名称的反馈意见。
  • 可视化编辑器中,我们正在更改现有的引用对话框,使其支持子引用。

主要优点

  • 子引用建築於目前的引用方式之上。
  • 它同时适用于可视化编辑和源代码编辑 - 使我们更接近可视化编辑和源代码编辑之间的功能平等。
  • 该解决方案将集成到 MediaWiki 中,因此可在所有维基媒体维基中使用,而且无需基于模板。
  • 子引用可正确显示参考参考文献预览窗口,并且预览框在移动端也可以正常弹出。
  • 可选项:您仍然可以使用其他方法进行引用。 但您可能会在其他用户撰写的文章中遇到子引用。
 
请告诉我们您的想法。重要的是,这项新功能不可以干扰用户的工作流程,而且要直观,并能很好地为源代码编辑和可视化编辑器的用户服务,无论他们的经验水平如何,也无论他们是否了解维基文本和模板。为了确保这一点,我们需要您的反馈:

工作原理

在维基文本中使用

子引用的维基文本解决方案已接近完成。不过,属性名称可能会改变。该解决方案尚未部署,主要是因为我们希望避免可视化编辑器用户获得与源代码编辑用户截然不同的体验。可视化编辑器支持仍在开发中。   你仍可測試原型,與告訴我們你的想法。

具体优势

  • 该解决方案基于已知的命名引用概念。
  • 不需要任何模板知识。
  • 可以删除维基文本中近似重复的引用,使其更简洁、减少冗余文字、并更易于阅读。

 


 

分步指南

你首先需要一个包含主要书目的引用(主引用),并且你需要对这个引用进行命名:

<ref name="Miller">E. Miller, ''The Sun''. New York: Academic Press, 2005.</ref>

主引用应放置在参考文献部分,否则文章中的引用将不会显示诸如页码等详细信息。在参考文献部分,使用维基文本语法<references> … </references>。如果文本已经使用了<references />,将其删去即可。

2)之后你可以创建一个子引用,该子引用在使用主引用名字的同时,对其添加extends属性:

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

 

 
请牢记

如果您要在维基文本中使用子引用以引用来源,只需确保在引用部分创建主引用即可。

但在很多情况下,您可能希望使用子引用来引用文章中已经存在的参考资料。 在这种情况下

  1. 使用 <ref name> 将原始参考文献转化为主参考文献。
  2. 将主参考文献移至参考文献部分。
  3. 在文章中原始参考文献的位置创建子参考文献。
  4. 将主参考文献的详细信息(页码等)移至子参考文献中。确保它们不再保留在主参考文献中,否则这些细节将显示两次。
  5. 在文章中需要引用不同细节出处的地方创建更多的子参考文献。

您还可以通过给子引用命名来重复使用子引用本身

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>

 


请注意

  • 将引用转换为主引用和子引用需要进行一些清理;主引用通常需要放在引用部分(如上所述)。
  • 你可以使用引用模板进行子引用。我们已经测试了最常用的模板,但你喜欢的模板可能需要在一些更新后,才能适用于最新的引用方案。
  • 一些与引用相关的小工具和脚本也可能需要更新,以便与新的子引用解决方案配合使用。
  • 不可能对子引用进行子引用。
  • 如果<ref group>已被使用,则主引用和子引用需同属一个分组中。


在可视化编辑器中(开发中)

现在,我们还不清楚可视化编辑器新功能具体是什么样子。到目前为止,我们的解决方案还非常简陋,暂时不能投入使用。在之后的几周,这个方案大概率会有改动。   您还可以使用可视化编辑器解决方案当前状态的测试原型。请记住,它很可能会发生变化。我们将在可以测试新内容时更新本页。

可视化编辑特有的优势

  • 若要引用同一资料来源的不同细节,您不必再从头开始创建新的引用。
  • 子引用与可视化编辑器完全兼容(而非基于模板的变通方法): 您可以通过引文对话框创建子引用,也可以在参考文献部分编辑子引用。

 


 

当前测试版本的操作流程(可能会有改动)

创建子引用

  • 目前可通过现有的引用对话框创建子引用。
  • 在 "扩展 "选项卡中选择要重复使用的引用。该选项卡可能会在我们目前的用户测试环节后得到改进。
     
  • 输入子引用的详细信息,然后单击插入。
     
  • 在可视化编辑器中,引用弹出窗口会显示该参考文献是一个子引用,并显示其被重复使用的次数。
     

编辑现有的子引用

  • 单击文章文本中的脚注标记,编辑子引用。
  • 您现在可以更改子引用的详细信息。您还会被告知这是一个子引用。
     
  • 您还不能编辑参考文献列表中的子参考文献。
  • 要编辑主引用,请单击参考文献部分中的主引用。

重用一个子引用

  • 您可以使用引文对话框中的“复用”选项卡以重复使用子引用。
     

请注意

  • 可视化编辑器中引用自动命名的现有问题也会出现在子引用中。
  • 在可视化编辑器中,目前可以对子引用创建子引用。这是一个错误,并在保存时会导致错误。这不应用于实际解决方案,在维基文本中也无法正常工作。
  • 我们尚未处理删除一个被重复使用的引用时会发生的情况。
  • 将现有引用转换为主引用和子引用的工作流程尚未定义。
  • 当您在可视化编辑器中创建子引用的重复使用,然后切换到源代码编辑时,您会发现维基文本中的语句是<ref extends="main-reference" name="sub-reference" />。这是一个错误,将作为T367749的一部分进行修复。
  • 在可视化编辑器下,<ref name="sub-reference name"/> 目前无法正确显示子参考的参考预览。您只能在弹出窗口中看到子引用的详细信息,而不能看到主引用的信息。要在弹出窗口中同时看到主引用的信息,目前应使用语法 <ref extends="main" name="sub-reference name" />

 測試我們的原型

我们需要你的反馈来确保正确的功能构建。任何反馈或问题都可以在该项目的讨论页面上提出。

原型已在beta维基上提供。目前,我们主要邀请用户测试维基文本中的解决方案: 在beta维基上进行测试 反馈

 
请注意beta维基与普通维基有些不同:
  • 外观可能不同(例如没有使用您设置的皮肤)。
  • 也可能会提供一些仍在测试中的新功能。
  • beta维基只包含一些测试页面和模板,而不是整个维基百科的内容,也没有你习惯使用的所有模板、模块、小工具等。
  • 您无法使用您普通维基的账户。您可以注册一个账户,确保和普通维基账户的密码不同,或者在没有账户的情况下测试该功能。这将会创建一个临时账户(在德语beta维基上),或者显示你的IP地址(在英语beta维基上)。

我们正在解决的问题

在维基百科文章中,通常会多次引用同一个来源。但虽然你可以直接重复使用相同的引用,但目前无法在引用不同细节(例如不同页码)的情况下重复使用同一个引用。你只能选择创建一个新的引用或使用其他方法。

现状: 在维基文本和可视化编辑器中重复使用参考文献

如果想在维基文本中重复使用参考文献,可以将其转化为命名参考文献,并在文章的另一处引用该名称。命名参考文献可以放在文章文本中,也可以放在参考文献部分。在可视化编辑器中,您可以使用引用对话框中的 “复用 ”选项。在参考文献部分,具有相同名称的参考文献会被组合在一起。

现状: 在维基文本中重复使用具有不同细节的参考资料

如果想在维基文本中重复使用细节不同的现有参考文献,目前需要复制并粘贴现有参考文献,然后更改重复内容的细节,或者从头开始创建一个几乎相同的新参考文献。有些项目使用简短引用缩短脚注等基于模板的解决方案。在参考文献部分,原始参考文献和您创建的新参考文献不会放在一起。

现状: 在可视化编辑器中重复使用具有不同细节的引用

如果您想在可视化编辑器中以不同的细节重新使用已有的参考文献,引文对话框中的“复用 ”选项和复制粘贴都不会起作用,因为这两种方法都会导致完全相同的重新使用,而更改重新使用或复制的参考文献的细节会改变该参考文献的全部。相反,你需要从头开始创建一个几乎相同的新引用。在“引用 ”部分,原始引用和您创建新的引用不会被组合在一起。

通过{{sfn}}等基于模板的变通方法创建的参考文献无法在参考文献部分进行编辑,也不会出现在引文重用选项卡中;但可以在文章文本中查找这些参考文献时对其进行手动编辑。

使用{{sfn}}的变通方法

读者遇到的问题

参考文献预览参考文献提示工具和手机软件的参考弹出窗口中无法正确显示基于模板的变通方法。

带有引用预览的{{sfn}}解决办法

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.

  •  Y 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.
  •  YWe have sent out announcements across all wikis to let communities know about this upcoming feature, and have invited them to test and give feedback.
  •  YOur team presented sub-referencing at Wikimania 2024 and discussed with participants. (YouTube)
  • Moderated users tests are taking place across different projects.
  • We are reaching out to potential pilot wikis and are planning to deploy the sub-referencing feature on those wikis in October.
  • 我們計劃在2024年底之前在其他維基媒體的維基上部署子引用功能。
  • 我們將在功能安裝後持續收集用戶反饋。

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.

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.

为什么找到解决方案花了这么长时间?

技术愿望团队在这个功能上断断续续工作了很多年。如果你想了解更多信息,请参阅问题的历史和复杂性概览