Editing csl code

Hi everyone,
I'm having some trouble getting my bibliography to be sorted alphabetically using dropping particles and non-dropping particles (eg. Van der Wal). The only way I can get them to be sorted correctly is to capitalise the first letter of all the parts of the surname (Van Der Wal), but I don't want to do this. In the bibliography, the entries should be in this order:
Van Beusekom
Van de Koppell
Van der Wal
Van Eerdt

But at the moment, I can only get it to be listed as this:
Van Beusekom
Van Eerdt
Van de Koppell
Van der Wal

As I say, it seems to put them in the right order when I capitalise the "de" to "De", but I don't want to do this. Can anyone help?

Here is the relevant parts of my code (I think):

<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never">


<macro name="author">
<names variable="author">
<name name-as-sort-order="all" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="never" form="long">
</name>
<label form="short" prefix=" (" suffix=".)" text-case="lowercase" strip-periods="true"/>
<substitute>
<names variable="editor"/>
<text macro="anon"/>
</substitute>
</names>
</macro>


<bibliography hanging-indent="true" et-al-min="20" et-al-use-first="1">
<sort>
<key macro="author"/>
<key macro="year-date"/>
<key variable="title"/>
</sort>
<layout suffix=".">
<group delimiter=" ">
<text macro="author"/>
<text macro="year-date" prefix="(" suffix=")"/>
<text macro="title"/>
<text macro="edition"/>
<text macro="container-prefix"/>
<group delimiter=", ">
<text macro="editor"/>
<text variable="container-title" font-style="italic"/>
<text variable="collection-title"/>
<text variable="genre"/>
<text macro="publisher"/>
<text macro="locator"/>
<text macro="published-date"/>
<text macro="pages"/>
</group>
</group>
</layout>
</bibliography>
  • With demote-non-dropping-particle="never", I get the first (correct) sort ordering. Have you switched away from the style and then back after making your change to the style node?
  • Yes, I've tried that already.
    What I don't understand is that if I edit the author's names to be Van De Koppell and Van Der Wal, they are placed in the correct order. So it is obviously treating those parts of the names starting with lower case letters differently to those parts starting with upper case.
  • edited August 2, 2012
    I'm not entirely sure if this causes the problem, but you probably should store "Van de Koppell" as "van de Koppell" in your Zotero library. You can modify the style to recapitalize the "Van" if that's desired (with the "text-case" attribute on cs:name-part).
  • @dcprice: with demote-non-dropping-particle="never", this works for me (as fbennett).

    Can you upload your style here - https://gist.github.com/ - and post the link here?
  • If I change the "Van" to "van" it gets placed right at the bottom of the reference list, even under any entries starting with a "z".

    Here's the link to my style:
    https://gist.github.com/3238381
  • edited August 2, 2012
    First, your style does not validate. This is probably not related to the particle problem but you should fix the errors.

    With your custom style, I get the right/desirable output in the bibliography, i.e.:
    Van Beusekom, ...
    Van de Koppell, ...
    Van der Wal, ...
    Van Eerdt, ...
  • edited August 2, 2012
    As a heads-up for Frank, there has been more discussion about whether sorting should be case insensitive: https://github.com/citation-style-language/styles/issues/189
  • If I change the "Van" to "van" it gets placed right at the bottom of the reference list, even under any entries starting with a "z".
    I can't even reproduce that.
    What's your version of Zotero?
  • edited August 2, 2012
    I'm actually using Mendeley 1.6. I assumed it worked exactly the same as Zotero in terms of creating the citations and bibliography, but obviously not. I always find the Zotero forums much more helpful which is why I posted here!
    I have just downloaded Zotero myself and my style does work exactly as it should with it. How strange that Mendeley doesn't do the same.
    I'll have to try and see if anyone over there can help.
  • please always mention which software you're using with CSL questions - things like this (which as Gracile notes aren't that infrequent) are a waste of time and Mendeley doesn't have the best reputation here in Zotero-land in the first place (while you're here: don't use buggy closed-source software with mediocre support).
  • Yeah, sorry I didn't mention it straight away. I don't know much about coding and I thought it was all down to an omission from my code.
    I started off using Zotero when I began my PhD, but I liked the look of Mendeley more!! Might think about going back to Zotero now, but I'm not sure if I can face transferring all my tags and that over!!
  • The difference in sorting behaviour could be due to some difference in the way names data is delivered to the processor, or to a difference in processor versions. The Mendeley forums are your best bet for getting to the bottom of the issue, for sure.

This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.

Sign In or Register to comment.