Editing Styles

Editing Styles

There are several tools available for editing CSL styles. We should warn you though, that there is a bit of a learning curve involved. Requirements for citation formatting are often complex, and so is CSL. Therefore, regardless of the tools you use, we strongly recommend that you take a look at some CSL documentation. Beyond the introductory primer, CSL is extensively documented in its specification. The Zotero wiki also has some step-by-step instructions for editing CSL styles.

First, there is the CSL style editor (documentation) by Mendeley. This editor has four main functions:

  • The “Search by Name” tab allows you to search styles by their name.
  • The “Search by Example” tab allows you to search for styles that produce a particular format (or something close to it), by reformatting the citation and bibliographic entry of one of the provided items. This can be useful to find styles that already exist under another name, or to find a closely matching style that you can use as a starting point for editing.
  • The “Visual editor” tab contains the actual style editor, and shows a live preview of the style as you make your edits. Using the editor is still pretty complex, and it is recommended to read up on CSL before attempting major edits.
  • The “Code editor” tab contains a more basic editor that allows you to directly edit the XML code of the style. This tab also has a live preview.

Second, the Zotero desktop clients (Zotero for Firefox and Zotero Standalone) ship with two utilities:

  • The Reference Test pane allows you to edit the XML code of a style. Different from the “Code editor” tab of the Mendeley editor, the Reference Test pane provides a live preview using items selected in the Zotero client.
  • The Preview pane provides previews using items selected in the Zotero client for all installed CSL styles.

Finally, CSL styles can also be edited in any text or XML editor, such as jEdit or Notepad++, but here some basic knowledge of XML (or HTML) is required.