Help creating a citation style
Hi,
I am trying to create a citation style for E:Co (http://iscepublishing.com/ECO/submissions.aspx) which works extensively with ISBN and ISSN numbers in the bibliography, as in author-title-ISBN (or ISSN)
My original thought was modifying the Chicago (author-date) style CSL, but I can't seem to get the ISBN /ISSN numbers to display.
I made a test style using the simple style editor, and currently I have done the following
<bibliography>
<option name="et-al-min" value="4"/>
<option name="et-al-use-first" value="4"/>
<option name="hanging-indent" value="true"/>
<layout>
<text macro="author-short" prefix="" suffix=""/>
<text macro="title" prefix="," suffix=""/>
<choose>
<if type="book">
<text macro="ISBN" prefix="" suffix=""/>
</if>
<if type="article-journal">
<text macro="ISSN" prefix="" suffix=""/>
</if>
<else>
<text macro="DOI" prefix="," suffix=""/>
</else>
</choose>
</layout>
</bibliography>
The macros are pretty straightforward.
Does anyone have ideas how to get me on track?
Thanks
Kees
I am trying to create a citation style for E:Co (http://iscepublishing.com/ECO/submissions.aspx) which works extensively with ISBN and ISSN numbers in the bibliography, as in author-title-ISBN (or ISSN)
My original thought was modifying the Chicago (author-date) style CSL, but I can't seem to get the ISBN /ISSN numbers to display.
I made a test style using the simple style editor, and currently I have done the following
<bibliography>
<option name="et-al-min" value="4"/>
<option name="et-al-use-first" value="4"/>
<option name="hanging-indent" value="true"/>
<layout>
<text macro="author-short" prefix="" suffix=""/>
<text macro="title" prefix="," suffix=""/>
<choose>
<if type="book">
<text macro="ISBN" prefix="" suffix=""/>
</if>
<if type="article-journal">
<text macro="ISSN" prefix="" suffix=""/>
</if>
<else>
<text macro="DOI" prefix="," suffix=""/>
</else>
</choose>
</layout>
</bibliography>
The macros are pretty straightforward.
Does anyone have ideas how to get me on track?
Thanks
Kees
I've pasted to style to http://gist.github.com/116087
In itself the citation style is pretty straightforward author-title(italics)-ISBN/ISSN
I also need to have a page prefix ':' in the citation, eg (doe, 2009: 44-49)
Thanks
Kees
If you're not afraid of XML, you might want to try writing the style by hand*. The Simple Style Generator doesn't seem to have received any maintenance in the last few months, and it still spits out styles with quite a few errors.
*http://www.zotero.org/support/dev/creating_citation_styles
XML's no problem for me, but could you tell me what you're testing it with? I do check for XML consistency, but check the style in word..which seems a bit slow in debugging ;)
Thanks
Kees
NB..forget the question about testing...shoul've looked better at your answer; sorry about that
On editors, I strongly recommend emacs nxml-mode, since it gives you realtime validation and auto-completion against the schema. It's typically included by default in any modern emacs install (at least on OS X and Linux).
oXygen is an excellent proprietary alternative.
*http://forums.zotero.org/discussion/5404/pubmed-id/?Focus=26406#Comment_26406
P.S. I also came across a recent update by NIH, which requires authors of proposals to cite PMCIDs, so better ID-support would really help there.
Just an idea...is it possible to have a element that allows one to included a free form element, which doesn't display anything when the field does not exist?
something like
<text variable="issn">
This way, if a document contains a variable it can be used. Considering the enormous possibilities to customise different media, such an approach would facilitate new media that added to csl. I can even imagine that elements like 'doi', 'url' and so on would become pre-configured examples of the above.
I think making CSL aware of the distinction between ISBN10 and ISBN13 introduces more problems than it solves (e.g. what to do if a style specifies the use of ISBN10, but the supplied item data only offers a ISBN13. Should the CSL processor then be able to convert between ISBN10 and ISBN13? What if both ISBN10 and ISBN13 are supplied, but the style calls for ISBN, which ISBN is preferred then?). So it seems much more logically to just:
- don't add isbn10 and isbn13 variables to CSL, and stick with the isbn variable
- have Zotero site translators save only a single ISBN to the ISBN field (preferably ISBN13, since ISBN10 is being phased out*)
*http://www.isbn.org/standards/home/isbn/transition.asp