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
  • Can you paste the whole style here, and report the link? That will make it easier to troubleshoot your problem.
  • Interesting site!

    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
  • With regard to your problem: your style lacks a definition of the ISSN macro. However, ISBNs do appear when I test the style.

    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
  • edited May 22, 2009
    Ah..then that might be it!
    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
  • I write my styles in jEdit, test them in the Zotero Reference Test pane, and validate them at validator.nu. The latter two tools are described in more detail at the link I gave you in my previous post.
  • edited May 24, 2009
    I have manged to make some headway in CSL in the past few days, but I still don't see how I can get a journal's ISSN number to display in the bibliography. Any help/suggestions would be greatly appreciated!
  • edited May 24, 2009
    I justed checked the CSL schema, and it doesn't contain the issn variable (I thought it did, but the schema only allows for ISSN-metadata in the info-section of the style). So the schema would have to be extended, and the ISSN field in Zotero will have to be mapped to the new CSL issn variable. Sorry I missed that earlier.
  • I've never seen a need to include an issn, which is why it's not there. But we can add it. Feel free to do that if you like Rintze (to the "split" branch).

    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.
  • BTW, I've always found Zotero/CSL a bit lacking when it comes to distinguishing ISBN10 and ISBN13 (they don't), and print/online ISSNs (not to mention ISSN-L). Some translators just dump both ISBN10 and 13 into the ISBN field, which isn't pretty. I know there was some talk* some while ago about extending support for item identifiers (PMCID), and I guess these are also candidates.

    *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.
  • edited May 25, 2009
    No worries, Rintze...you just saved me a wild goose chase! Yeah, I know the journal has a weird format...but it forced me to learn more about CSL, so I guess that's good!
    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.
  • edited May 25, 2009
    The benefit of the current restricted list of variables is that it forces a centralized approach. CSL and Zotero aim for good data portability, which is much easier to accomplish with a uniform data model.
    I can even imagine that elements like 'doi', 'url' and so on would become pre-configured examples of the above.
    In a sense they are already. If an item doesn't have a doi, it won't display.
  • I can imagine that there's always a delicate balance between too much and too little. I guess it depends on the amount of media that CSL expects to support. If it remains fairly restricted a centralised approach can work very well.
  • edited May 25, 2009
    I think we can have our cake and eat it too. The approach we've taken is a system that avoids relying on types for formatting, and which at its core uses fairly generic variables that can be used in many different content types. Adding new variables and types is easy. This is a recipe that works, and the alternative is, in my view, inviting big headaches down the line.
  • But what about my implicit question: do you wish to extend the identifier-support for CSL 0.9 beyond the addition of ISSN? I think a case could be made for the variables issn-print, issn-online, issnl, isbn10, isbn13, pmid, pmcid and (already present) doi. ISBN10 and ISBN13 can probably be easily parsed from Zoteros current ISBN field (although I think Zotero should offer both fields), but support for issn-print/issn-online/issnl and pmid/pmcid would require changes in Zotero.
  • Sure; I see no problem adding new identifiers.
  • But I'd guess that isbn10 and isbn13 should replace isbn, so that would be a backward incompatible change.
  • I'm not sure; we could have all three. But some coordination would be valuable.
  • edited May 28, 2009
    My bad. I knew that some books have both a ISBN10 and ISBN13, and that at least some Zotero translators (e.g. Google Books) save both to the ISBN field. But I wasn't aware that these different numbers are (totally) redundant. Apparently, with the introduction of ISBN13, ISBN10 has become merely a subset of ISBN13, lacking only a prefix present in ISBN13, and carrying a different checking digit.

    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
  • Is there any idea when the ISSN field becomes available? I'm not in a super rush for the journal article, but if it takes a while, I may just have to add them by hand.
Sign In or Register to comment.