no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Last revision | |||
— | zh:dev:citation_styles:style_editing_step-by-step [2011/07/18 05:09] – created gao | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======修改 CSL 样式 ====== | ||
+ | 虽然没有 CSL 的编辑器,但是修改样式其实一点都不困难。你甚至都不需要太多的 XML 知识,只需要按照下列步骤进行即可。 | ||
+ | ===== 打开测试面板 ===== | ||
+ | |||
+ | 在Firefox浏览器地址栏中输入 | ||
+ | |||
+ | ''< | ||
+ | |||
+ | 如下所示。 | ||
+ | |||
+ | {{: | ||
+ | |||
+ | 打开Zotero面板,选定一个或多个条目,关闭Zotero面板,在测试面板右侧下拉菜单中选择一个样式,CSL样式将会在第一个文本框中出现,引文和参考文献目录将在第二个文本框中出现。 | ||
+ | |||
+ | ==== 动它一下 ==== | ||
+ | |||
+ | 现在你可以在第一个文本框中改动XML文件的内容。只要改动后的文件仍然具有正确的结构,改动后的格式就会在第二个文本框中显示。 | ||
+ | **注意**你所做的改动不会自动保存,请自行保存。你可以将相应的文本复制到文本编辑器中,存为以csl文件(*.csl)。 | ||
+ | |||
+ | ====示例==== | ||
+ | |||
+ | 在CSL文件的末尾,会有''< | ||
+ | 一般情况下,你只需要改动这两个部分。 | ||
+ | |||
+ | **code**代码块决定引文格式 | ||
+ | < | ||
+ | < | ||
+ | <option name=" | ||
+ | < | ||
+ | <key variable=" | ||
+ | </ | ||
+ | <layout prefix=" | ||
+ | <text variable=" | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | **bibliography**代码块决定参考文献格式 | ||
+ | < | ||
+ | <option name=" | ||
+ | < | ||
+ | <text variable=" | ||
+ | <text macro=" | ||
+ | <text macro=" | ||
+ | < | ||
+ | <if type=" | ||
+ | <text macro=" | ||
+ | <text macro=" | ||
+ | </ | ||
+ | < | ||
+ | <group prefix=" | ||
+ | <text term=" | ||
+ | <text macro=" | ||
+ | <text variable=" | ||
+ | </ | ||
+ | <text macro=" | ||
+ | <text variable=" | ||
+ | </ | ||
+ | < | ||
+ | <text variable=" | ||
+ | <text macro=" | ||
+ | <text variable=" | ||
+ | <text variable=" | ||
+ | <text variable=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===改变标点符号=== | ||
+ | 引文格式的差异通常会很小,你可以找一个类似的格式,只需要做些许改动,就可以得到你想要的格式。 | ||
+ | 一般情况下,你只需要改动参考文献目录中的标点符号,各个项目(作者,题目,年份等)的位置就可以了。 | ||
+ | |||
+ | 在 Zotero 中,分别以'' | ||
+ | |||
+ | 例如,下列改动将会将卷号由格式'' | ||
+ | < | ||
+ | < | ||
+ | |||
+ | |||
+ | ===改变参数=== | ||
+ | |||
+ | 当一篇引文的作者有多个的时候,常常需要显示 //et al.// 的缩写,这需要一个**option**参数。这个设置在CSL 0.8.1 和 1.0 中有所不同。 | ||
+ | |||
+ | |||
+ | ==CSL 0.8.1== | ||
+ | |||
+ | For example, to remove all [[kb/ | ||
+ | |||
+ | ''< | ||
+ | |||
+ | And just delete the whole line. | ||
+ | You'll see the change occur immediately in the preview pane below. | ||
+ | |||
+ | 如果有4个以上作者时,只显示第一个作者,并加上 //et al.// ,那么会有如下代码: | ||
+ | < | ||
+ | <option name=" | ||
+ | 不妨将4改为6,将1改为3,你会在下面的文本框中看到改动后的结果。 | ||
+ | < | ||
+ | <option name=" | ||
+ | |||
+ | The [[dev/ | ||
+ | |||
+ | ==CSL 1.0== | ||
+ | In CSL 1.0, the same options - and several new ones - exist, but they are not listed separately, but included in the < | ||
+ | < | ||
+ | |||
+ | A bit of trial and error, and testing with a few combinations should help. You can see what different items and combinations will look like by selecting them in Zotero (Ctrl-click to select multiple items), and then " | ||
+ | |||
+ | < | ||
+ | < | ||
+ | If your style has a mistake, an error message is displayed instead of a citation. Often these messages can help you figure out what you're doing wrong.< | ||
+ | |||
+ | ==== 改变样式的标题(Title)和 ID ==== | ||
+ | |||
+ | 强烈建议你修改样式的Title和ID。 | ||
+ | |||
+ | 否则: | ||
+ | * 你安装新的样式会覆盖掉原有的样式 | ||
+ | * 自动更新之后,你的自定义样式又会被更新覆盖。 | ||
+ | |||
+ | 这部分内容在文件的开头,像这个样子: | ||
+ | |||
+ | |||
+ | < | ||
+ | < | ||
+ | |||
+ | 你可以将其改为 | ||
+ | |||
+ | < | ||
+ | < | ||
+ | |||
+ | ==== Different CSL versions ==== | ||
+ | Starting with version 2.1, Zotero uses an updated version of the Citation Style Language, [[http:// | ||
+ | |||
+ | ===== 使用你自定义的样式 ===== | ||
+ | |||
+ | 你需要将一个样式安装到 Firefox 中,或者说安装到 Zotero 中。 | ||
+ | |||
+ | 将样式的文本全选,复制并粘贴到文本编辑器中,保存为一个以**.csl**结尾的文件。然后,拖动该文件到 Firefox 窗口上面,会提示你是否安装,如下图所示。 | ||
+ | |||
+ | {{: | ||
+ | |||
+ | 选择确定。该样式就会安装到你的 Zotero 中了。 | ||
+ | |||
+ | |||
+ | ===== Some Slightly more advanced tips ===== | ||
+ | |||
+ | For anything more advanced, [[dev/ | ||
+ | |||
+ | If you are making several changes, you might want to copy all the CSL code from the top window (Ctrl-A, Ctrl-C) and paste it into a new file in a text editor. Notepad works fine, though using a good text editor designed for programming like the free [[http:// | ||
+ | |||
+ | You'll find that your fellow users on the Zotero forum will be happy to help you with any problems. The forums also have little nuggets of gold all through them, and [[/ | ||
+ | |||
+ | ===== Sharing Styles ===== | ||
+ | |||
+ | If your new style has general appeal, consider [[dev/ |