====== Citation Styles ====== ===== Citation Formatting in Zotero ===== Zotero有多种方法生产引文和参考文献目录。它们可以在[[/support/word_processor_integration|字处理软件]] (Word,OpenOffice)中自动生成,也可以通过 [[/support/creating_bibliographies|Quick Copy]] 或者 [[/support/rtf_scan|RTF Scan]]来完成。而 [[http://citationstyles.org/|引文格式语言]] (CSL) 就是这一切得意工作的基础,Zotero基于该语言生成引文和参考文献目录。 CSL 是独立于Zotero之外的一个开源项目,不过 CSL 和 Zotero 之间存在密切联系。因为 Zotero 中有超过 1500 个 CSL 样式可供使用。 此外,Zotero 通过另外一个开源项目[[https://bitbucket.org/fbennett/citeproc-js/wiki/Home|citeproc-js]]来处理 CSL 样式,以便将正确的引文格式展示出来。确切的说,是 citeproc-js 在格式化引文,Zotero 要做的只是提供一个平台(即citeproc-node)。 下面我们介绍一下如何编辑一个 CSL 文件。 ===== Editing CSL Styles ===== CSL 文件事实上是由 XML 写成的。你可以使用任意一个文本编辑器来编辑它(如记事本)。 为了方便调试 CSL 文件,Zotero 自带了两个测试工具。 * The Zotero Reference Test pane. 在 Firefox 浏览器地址栏中输入 "chrome://zotero/content/tools/csledit.xul" 访问,该工具实时展示在 Zotero 中选定条目的引文格式。 * The Zotero Preview pane. 在 Firefox 浏览器地址栏中输入 "chrome://zotero/content/tools/cslpreview.xul" 访问,该工具会把你选定的条目以所有你已经安装的样式展示出来。 ==== The CSL 0.8.1 to 1.0 Upgrade ==== Zotero 2.1 is the first release to support CSL 1.0 (through citeproc-js). Earlier versions (up to Zotero 2.0.9) supported CSL 0.8.1 through an in-house developed CSL processor. All the styles in the [[/styles|Zotero Style Repository]] have been upgraded from CSL 0.8.1 to 1.0. The Zotero Style Repository now draws it styles from the [[https://github.com/citation-style-language/styles|GitHub CSL 1.0 style repository]] instead of from the Zotero SVN. If you have a customized style that is not in the repository and is still in the 0.8.1 format, you can continue using it: Zotero 2.1 and newer still accept CSL 0.8.1 styles and convert them internally to CSL 1.0. However, if you want to take full advantage of the new features of CSL 1.0, consider [[http://citationstyles.org/downloads/upgrade-notes.html#updating-csl-0-8-styles|upgrading your style]]. CSL 0.8.1 and 1.0 styles can be easily distinguished by looking at the cs:style element at the top of the style. CSL 1.0 styles include a version attribute on this element with a value of "1.0", e.g. "