9
Intro to the Citation Style Language Sebastian Karcher Boston College, November 2012

Zotero Workshop - Citation styles

Embed Size (px)

Citation preview

Page 1: Zotero Workshop - Citation styles

Intro to the Citation Style Language

Sebastian Karcher

Boston College, November 2012

Page 2: Zotero Workshop - Citation styles

What we will learn this session

Zotero’s citation styles are writen in CSL - Citation StyleLanguage

While there are 700 styles covering almost 3000 publications,users frequently ask for specific journals or would like smalladjustments to style for their own use

We will learn how to use a visual editor for CSL to + identifyexisting citation styles that resemble specifications + adjustthose citation styles

Page 3: Zotero Workshop - Citation styles

Brief history of CSL

Developed by Bruce D’Arcus

First Included in Zotero in 2006

Major Update to CSL 1.0 in 2010

Since then, adopted by Mendeley, Papers2, Quiqqa and other

Several Open Source processors for CSL, including citeproc-js,used in Zotero and Mendeley, written & maintained by FrankBennett

Project hosted at citationstyles.org, maintained principally byRintze Zelle

Page 4: Zotero Workshop - Citation styles

Advantages of CSL

Open source

Seamless switching between citation formats

<group> feature for complex formatting and missing fields

<macro> for efficient coding

<choose> conditionals

Multilingual

Page 5: Zotero Workshop - Citation styles

Currently not supported in CSL

Alphanumerical styles used in Math and Computer Science[LaCh87]LaCh87. Shui Fong Lam und K. Hung Chan. ComputerCapacity Planning: Theory and Practice. Academic Press,Inc., Orlando, Florida, USA. 1987.

Compound numerical styles used in Chemistry[1] a) B. M. Trost, Chem. Eur. J. 1998, 4, 2405–2412; b) H.J. Ache, Angew. Chem. 1989, 101, 1–21; Angew. Chem. Int.Ed. Engl. 1989, 28, 1–20; c) H. Frey, Angew. Chem. 1998,110, 2313–2318; Angew. Chem. Int. Ed. 1998, 37,2193–2197.

Limited support for journal abbreviations

Page 6: Zotero Workshop - Citation styles

Basic structure of a CSL style

CSL is an XML language - it looks a lot like html. Likewebpages, CSL styles are built up of nested nodes.

<style> The parent of all other nodes. contains basic infoand “global” options such as default language

<info> section contains name of style and other identifiers

<macro> multiple macros that define recurring parts of thestyle (optional but useful)

<citation> defines the format for the in-text citation(required)

<bibliography> defines the bibliography (optional, butalmos always required).

Page 7: Zotero Workshop - Citation styles

Key CSL elements

<text> prints something - a var iable, a macro, etc.

<choose> begins a conditional: if –> then. Requires <if>as a child

<names> and <date> get special treatment

<group> groups several elements together.

<label> prints a label - such as “pp.” for a variable

prefix, suffix, delimiter - determine what happens betweenitems.

Page 8: Zotero Workshop - Citation styles

Using the Visual Editor

The core idea of the visual editor is that you do as littleediting as possible

Use the “search by example” function, especially the “bookchapter” item type.

Page 9: Zotero Workshop - Citation styles

Let’s write some citation styles!!!