Citoid/Enabling Citoid on your wiki/zh

Citoid 是一个“自动填充的引文生成器”，它根据 URL 或一些学术参考标识符（如 DOI、PMID、PMCID 和 ISBN）自动从在线资源创建引文模板. 它目前以 可视化编辑器功能，并在 1 美元. Citoid使用Zotero翻译器将页面链接转换为详细信息.

center|700px





第1步：启用引用模板工具
Citoid 服务使用 可视化编辑器的引文工具. 这已经在大多数大型维基百科和许多较小的项目中启用. 如果启用了引文工具，则"" 菜单将列出一个或多个本地引文模板，以及 ""和"". 如果未启用引文工具，则需要先启用它，然后再继续，按照Citation tool definition. 每个引文模板都需要正常的模板数据来工作.



第2步：配置Citoid
必须使用特殊的模板数据映射和特定于 Citoid 的特殊消息来配置 Citoid 扩展. 按顺序执行这两个步骤很重要！



第2a步：为每个引用模板创建“citoid”地图值
由于 Citoid 对于每种文档类型都有自己的一组字段（例如，期刊名称在 Citoid 中称为“publicationTitle”，但在 Template：Cite_journal 中称为“journal”），因此您需要在 [[Special:MyLanguage/TemplateData| 这条消息将34种原生Citoid类型（ ， ， ， ， 等）映射到相应的模板（Cite web，Cite book，Cite journal等）.

You should match a local citation template to every single Citoid type. If no template is matched, then Citoid will not work. It's better to have a bad match than none at all. For example, your wiki may not have a special template for citing the liner notes in the packaging for a DVD, so consider using a template designed for a book or a video in that case. You may consider using a generic template, such as en.wiki's Template:Citation, as a catch-all for types if there is no good match for the type of source you are mapping.

An example namespace message can be found on English Wikipedia: https://en.wikipedia.org/wiki/MediaWiki:Citoid-template-type-map.json.

Citoid has disappeared from my wiki
Please report any outage on Phabricator, and see that task for a temporary workaround.

The new cite button does not appear in the toolbar


When you create the MediaWiki message in step 2.b, the previous cite drop-down menu (File:VisualEditor_-_Cite_Pulldown.png) should be replaced by a new button for the citoid service in the toolbar menu. If the new button does not appear in the toolbar, then there may be a problem with MediaWiki:Citoid-template-type-map.json. If this page does not exist locally, or if the JSON on that page is invalid, then citoid will not work. Alternatively, you may need to refresh your JavaScript cache.

Empty references appear
Empty references most commonly appear when you are trying to insert a citation template that has no maps data. This problem also appears if the template has maps data, but that data is not reaching the MediaWiki API. If the maps object is present in TemplateData block in the template's documentation, then try making a "null edit" on the template. If that doesn't work, then there may be an issue with the map itself.

My favorite site isn't recognized by Citoid and only gets basic information
The Citoid service relies on the brilliant Zotero community for much of the "magic", as Zotero translators need to be written for each site. You can see a list of all Zotero translators at https://github.com/zotero/translators. Right now, Zotero best supports English-language sources. We need your help to improve coverage of other sites. You can write your own Zotero translator. Start by looking at an existing translator of a similar website, and by reading the tutorial at Citoid/Creating Zotero translators.

Dates are formatted differently on my wiki
Dates with full information (month, year, and day) are in ISO format, which is an international standard. If the community doesn't like the way this looks to the user, it is possible to edit the citation template to format the ISO dates to something that is standard in your language. For instance, you can add logic to the template such that if the date is detected to be in ISO yyyy-mm-dd format, the date is reformatted *to appear* to be dd/mm/yyyy on the page. However, if you do this, the underlying data (i.e. when you edit the wikitext, or the form in VisualEditor) will still remain the same.

Dates with only month and year are in also in ISO (YYYY-MM) but these are not accepted by some citation templates. See.

Many language wiki templates (pl, it, en) don't accept xx-XX style language codes
See for the related task. See the thread at to learn how different wikis decided to workaround this limitation.



参见

 * Zotero tutorial
 * Zotero translation server -- xpcshell-based Zotero translation server, and zotero-node, an abandoned nodejs equivalent
 * Valid field names for each item type
 * Zotero field mappings
 * Research:Citoid support for Wikimedia references
 * https://www.zotero.org/support/dev/translators/testing
 * Learn how to write a translator with Sebastian Karcher, Zotero (video, slides, links)
 * List of websites with Zotero translators
 * Examples of different itemType URLs
 * James Forrester talks Citoid and Zotero at m:WikiCite 2017