This is an old revision of the document!


Citation Styles

Zotero uses Citation Style Language (CSL) styles and the citeproc-js CSL processor for creating citations and bibliographies.

For information on how to use existing CSL styles with Zotero, see Citation Styles. Most CSL-related developer documentation is listed at http://citationstyles.org/citation-style-language/documentation/.

This page describes CSL-related information that is specific to Zotero, and CSL-related projects by the Zotero developers.

Zotero Reference Test pane (csledit.xul)

The Zotero Reference Test pane is a tool to edit CSL styles. It can be opened by entering chrome://zotero/content/tools/csledit.xul in the Firefox address bar.

The test pane provides instant processing of a CSL style, using items selected in your local copy of Zotero. After loading the pane, you are shown a toolbar, and a split browser window underneath. The first step in using the test pane is to select a CSL style. You can paste the code of an independent style into the upper window, or select an installed style from the pull-down menu on the right. The next step is to select one or more items in your local Zotero library, and click the “Refresh” button. The lower window now shows formatted citations and bibliographic entries for the selected items and CSL style.

Citations can be modified in several ways. A locator can be specified using the pull-down menu and adjoining text-box on the left (e.g., to obtain “(Doe 2002, p.52)”). The “Suppress author” option can be checked (so that a “(Doe 2002)” citation gets rendered as “(2002)”), and, finally, the position of the cites can changed, so it is possible to see how cites to previously cited items are rendered.

As you edit the CSL code in the upper window, the citations and bibliographic entries in the lower window are automatically updated. The test pane shows an error if the CSL code is invalid XML. If the code is valid XML but invalid CSL, you may see an error, or the preview in the lower window will stop updating. After editing a style, always validate your style.

Important When you close the test pane, or select a style from the pull-down menu, any edits will be lost. If you are making extensive changes to a CSL style, save your edited code often.

Zotero Preview pane (cslpreview.xul)

The Zotero Preview pane is a tool to preview CSL styles. It can be opened by entering chrome://zotero/content/tools/cslpreview.xul in the Firefox address bar.

The preview pane shows rendered citations and bibliographic entries for all installed CSL styles, using items selected in your local copy of Zotero.

Self-hosting CSL Styles

If you decide to host CSL styles online yourself, serve them with a “text/x-csl” MIME type allows Zotero for Firefox to automatically recognize and install your styles.

citeproc-node

citeproc-node is a wrapper for citeproc-js for server-side rendering of citations and bibliographies.

Editing CSL 1.0 Styles

A currently somewhat outdated tutorial for making small CSL edits:

dev/citation_styles.1320770782.txt.gz · Last modified: 2011/11/08 11:46 by rmzelle