Of course, it helps to use an existing style sheet that closely resembles the citation style you want to make (duh)! Most existing citation styles
are quite elaborate and you may find it difficult to make sense of it. Here, I will start from scratch and point out the structure of the document.
With this, hopefully the existing style sheets will be easier to understand.
The base structure of the document is as follows:
<?xml version="1.0" encoding="UTF-8"?> <style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" xml:lang="en" default-locale="en-US"> <info> <title>My first style</title> <id>http://www.zotero.org/styles/my-style-name</id> <author> <name>My name</name> <email>my-address@wherever.com</email> <uri>http://wherever.com/</uri> </author> <category term="author-date"/> <category term="zoology"/> <updated>2008-10-29T21:01:24+00:00</updated> <summary>My great new style format.</summary> <rights>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License http://creativecommons.org/licenses/by-sa/3.0/</rights> </info> </style>The base document consists of a preamble, which gives some general information about the document, and includes a pointer to a template. This template defines how fields as 'author', 'category', 'summary' are defined, which attributes are allowed, and so on. The 'info' field contains the information about the citation style that you want to develop.
so far, the citation style does not contain any information on that what it is intended to do, that is to cite stuff. In order to do so,
the style sheet needs to included information about citations (e.g. "According to Doe (Doe 1999)") and the bibliography
(e.g. Doe, John (1999), "A History of Anonimity; A Personal Experience", Oxford University Press).
Extend your style sheet as follows:
<?xml version="1.0" encoding="UTF-8"?><style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" xml:lang="en" default-locale="en-US"> <info> <title>My first style</title> <id>http://www.zotero.org/styles/my-style-name</id> <author> <name>My name</name> <email>my-address@wherever.com</email> <uri>http://wherever.com/</uri> </author> <category term="author-date"/> <category term="zoology"/> <updated>2008-10-29T21:01:24+00:00</updated> <summary>My great new style format.</summary> <rights>This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License http://creativecommons.org/licenses/by-sa/3.0/</rights> </info> <citation> <option /> <layout> </layout> </citation> <bibliography> <option /> <layout> </layout> </bibliography> </style>
<citation> <option name="et-al-min" value="3" /> <layout> <names variable="author"> <name font-weight="normal"> </names> </layout> </citation> <bibliography> <option name="et-al-min" value="4" /> <layout> <names variable="author"> <name font-weight="normal"> </names> <text variable="title"> </layout> </bibliography>
pre> It is still far from perfect, but you can already see that the citations are put nicely in braces, a comma (,) separates authors from dates and titles and that even pages are displayed nicely when an article is selected.Single Citations
Stanley H. AmbroseMulti Citations
Stanley H. AmbroseBibliography
Stanley H. AmbrosePaleolithic Technology and Human Evolution
Home | Next: Macros | Citation Style Sheet (test_A.csl) |