It is a well-known fact in scholarly communication that there is a specific journal format for in-text citations and bibliography. Editing a citation style can be quite tedious and hence the development of citation tools is essential. The Citation Style Language (CSL) is an XML based language that simplifies citing references. The CSL Editor is an interface that allows you to find and modify citation styles that are appropriate for your document. You can find your desired citation style by searching for a journal’s name (that particular journal citation format will appear), searching by inputting an example of what the desired style looks like, or searching using the citation style name. If the style you need isn’t available, you can choose the one that’s closest to what you need and edit it. Once you have found your style or edited a style to match your needs, you can click “Install” in the case of a search result, or “Save” in the case of a style you’ve edited, to use it in your reference manager.
CSL is an open source piece of software, which means that the community can contribute new formats. As a result, more than 8,500 citation styles exist in the CSL Editor Tool. This tool for bibliographic styles has proved quite valuable with more than 4,500 unique visitors to the CSL Editor site every month. As a result of its usefulness and open source nature, the CSL has also been used in many popular reference managers such as Mendeley, ReadCube, Zotero, and Papers.
Using the CSL Editor Tool
As previously stated, the CSL Editor tool makes the formatting of citations and bibliographies significantly easier. From the CSL Editor page, searching by style name or finding the required journal citation format by searching for the journal name is fairly straightforward. In order to search by CSL citation styles, you need to edit a sample citation to fit the style that you would like to use. There are many different types of references, for example, how to cite a book with one author, how to cite a book with many authors, how to cite a journal article, how to cite a newspaper article, how to cite a report, or how to cite a book chapter to name a few. Currently, the CSL Editor allows you to search using one type at a time. If you highlight text in the inline citation or bibliography, you can format the text according to your desired style.
Once you have completed the formatting and started the search, the search results are listed in order of how closely they match your desired citation style. At this point, you can choose to install a citation style, edit it in the Visual Editor, or simply view information about it and its underlying code. Using the CSL Visual Editor is relatively simple. Once you have identified a style that you would like to change, you can click on “Edit”. You can click on an item that you wish to edit, which will change its color and will show the properties of the item in the bottom window of this bibliographic style editor. You can then make the changes in this bottom window. Any changes you make will be immediately reflected in the sample citation.
Clicking on the “Example Citations” menu will reveal additional types of citations that you can alter as needed. The CSL Visual Editor even lets you change the author names in the bibliography to small caps. Various options are available to edit the names in the desired format—bold, italics, underline, subscript, superscript, and small caps. Clicking on “Small Caps” will change the formatting of the author names to that option. More advanced users may also choose to directly edit the XML code.
Editor for Bibliographic Styles
CSL has many uses in scholarly communication, particularly with reference to formatting bibliographies and citations. The CSL Editor makes it incredibly easy to find a citation style or create the one you need by editing an existing citation style. Once you have used the CSL Editor tool to identify or edit your citation style of choice, it can be installed or saved to your reference manager for ease of use. The CSL Editor can simplify the way you comply with journal citation formats—try it!
Comments are closed for this post.
Editing CSL Styles - Step-by-Step Guide
CSL Visual Editor
An open source, visual CSL editor has been developed in a collaboration of Columbia University Library and Mendeley. You can find the editor here and a usage guide here. If you have trouble editing styles you can still ask for help on the Zotero forums. You can report bugs here - make sure you're reporting reproducible errors. The github issue tracker is not the place for questions.
Manually Editing CSL styles
In many cases you may still want to manually edit CSL styles. This guide provides easy to follow steps.
1 - Start with the Right Style
Start by checking the Zotero Style Repository. If you want to improve an existing CSL style, make sure that you start from the most recent version (the repository shows the date and time each style was last updated). If you want to create a new style, find the style that most closely matches what you need using the previews in the style repository. Typically the best way to find a most similar style is the “search by Example” function of the visual style editor.
2 - Edit the Style
Download the style you want to edit to your computer, and open it in a (plain) text editor like Notepad on Windows, TextEdit on Mac OS X (select “Make Plain Text” under “Format”), or gedit in Linux. Other options are Notepad++ for Windows, TextWrangler for Mac OS X, oXygen XML Editor, Emacs in nXML mode, and jEdit, which all support XML syntax highlighting (CSL is an XML-based language) and in some cases also real-time validation against the CSL schema.
Paste the style code into the Zotero CSL Editor, so you instantly see the effect of code changes on the style output. If you make your edits directly in the test pane, save your edits often via your text editor or using the “Save” button , as changes in the test pane get lost easily.
See the documentation page of the CSL project website for information on making CSL changes (in particular, make sure to take a look at the CSL specification. Below we discuss a few common and simple style edits to get you started.
Change the Style Title and ID
Important: Before installing your edited style, you must change the style title and ID at the type of the style code. If you don't change these, your modified style will be overwritten the next time the original style is updated.
The style title and ID are stored within the and elements near the top of the style. For example,<title>Harvard Reference format 1 (Author-Date)</title> <id>http://www.zotero.org/styles/apa</id>
can be changed to<title>Harvard Style Modified</title> <id>http://www.zotero.org/styles/apa-modified</id>
The URLs that you put in as an ID do not have to exist (i.e., you can use a zotero.org/style/mystyle type ID even if the style will not be posted on the Zotero repository).
In this example, we want to display the publisher (“CSHL Press”) and the location of the publisher (“Cold Spring Harbor, NY”) in a bibliographic entry. While this can be achieved with the code<text variable="publisher"/> <text variable="publisher-place"/>
this would result in “CSHL PressCold Spring Harbor, NY”. Fortunately, we can add some punctuation with the , and attributes. Let's say we want to separate the and by a comma-space, and wrap the whole in parentheses, i.e. “(CSHL Press, Cold Spring Harbor, NY)”. This can be done with:<group delimiter=", " prefix="(" suffix=")"> <text variable="publisher"/> <text variable="publisher-place"/> </group>
The advantage of use a element is that whenever you have a , but no , you don't end up with incorrect punctuation: the output would become “(CSHL Press)”. If you would set the punctuation directly onto the elements, e.g.<textvariable="publisher"prefix="("/><textvariable="publisher-place"prefix=", "suffix=")"/>
you would lose the closing bracket, i.e. “(CSHL Press”.
Changing Et-al Abbreviation
There are two main settings for et-al abbreviation (e.g., rendering the names “Doe, Smith & Johnson” as “Doe et al.”). The minimum number of names that activates et-al abbreviation, and the number of names shown before “et al.”.
In CSL, these settings can appear on the , , or elements in the form of the and attributes (it is possible to have separate settings for items that have been cited previously by using the and attributes).
For example,<citationet-al-min="3"et-al-use-first="1"> ... </citation>
will result in name lists like “Doe”, “Doe & Smith” and, if there are three or more names, “Doe et al.”. Try changing these numbers and observe the effect.
CSL offers multiple methods to disambiguate cites or names. For example, a style might normally render only the family name (e.g., “(Doe 1999, Doe 2002)”). If the authors are Jane Doe and Thomas Doe, these names can be disambiguated by adding initials or the full given names (e.g., “(J. Doe 1999, T. Doe 2002)”).
Disambiguation methods are selected on the element. For example, to disable given name disambiguation, delete the attribute, e.g. change<citationdisambiguate-add-givenname="true"> ... </citation>
to<citation> ... </citation>
Separation of authors
By default several authors are separated by a delimiter and the word . This settings can be changed, for example to use the symbol instead:<namesvariable="author"><nameform="short"and="symbol"delimiter=", "/> ... </names>
or to not use at all, but to use the delimiter :<namesvariable="author"><nameform="short"delimiter="/"/> .. </names>
The appearance of citations in (full) footnote styles may depend on their position in the paper. If the same source is cited twice, it may be that a shortened version is used in the second (and any further) citation. To handle this distinction, one can use conditional rendering based on the position of the citation. A generic structure could then look as<citation><layout><choose><ifposition="ibid-with-locator"> ... </if><else-ifposition="ibid"> ... </else-if><else-ifposition="subsequent"> ... </else-if><else> ... </else></citation></layout></citation>
If a case is missing in your style, you can add that and fill out what and how the information should be rendered in that case (an example of such a full footnote style).
3 - Install your Edited Style with Zotero
See Citation Styles.
Save the style with a “.csl” file extension (you can generally do this by simply typing ”.csl” after the name of your file). Then, go to the Cite pane in the Zotero preferences. Click on the “+” sign below the list of installed styles. In the file selection dialogue that opens, navigate to the .csl file you just created and open it. This will install your new style.
4 - Sharing Styles
If you get stuck at any point, try posting a question on the Zotero forums.