Problems with year-suffix-delimiter

Hello,

I am working of a custom CSL file with author-date citation style. But collapsing does not seem to work right: If I cite two publications from the same authors and the same year (in a multi-citation), I should be getting something like:

[André et al. 2006a,b]

Instead I get:

[André et al. 2006bundefineda]

Note that the order of the citations has also been exchanged (b before a). The relevant portion of my CSL file reads:

<citation>
<option name="collapse" value="year-suffix-ranged"/>
<option name="year-suffix-delimiter" value=","/>
<option name="disambiguate-add-year-suffix" value="true"/>
<sort>
<key macro="author-short"/>
<key variable="issued"/>
</sort>
<layout delimiter="; " prefix=" [" suffix="]">
<group delimiter=" ">
<text macro="author-short"/>
<text macro="year-date"/>
</group>
</layout>
</citation>

As a side-note: collapsing needs all authors to be identical, not only the one that is shown.

Any suggestions?

Thank you for your time!
  • The failure of the delimiter is a processor bug, which will be fixed soon.

    Concerning collapsing behavior, that would be a matter for the CSL design group; this was discussed at length before the current behavior was implemented, and it would not be for me to change things about off my own bat. Discussion should probably take place on the xbiblio-devel list, rather than here.
  • "collapsing needs all authors to be identical"

    one way to get there would be to use disambiguate-add-names. Having two identical citations that don't collapse would seem weird to me - do you have a style guide reference for that?
  • No, there is no style-guide. This is for a technical report, where collaborators selected the [Lastname year] citation style.

    So disambiguate-add-names is not an option, unfortunately. I think that not having the collapsing work in this (hopefully rare) case is the smaller of two evils.
  • @fbennett: I am not complaining (strongly) about the collapsing. Definitely not enough to get involved with the upstream xbiblio developers. Thank you on the update for the (known) bug and an expected bugfix, though. Any clue how long until that gets into Zotero?
  • Possibly a matter of hours.
  • There is an alternative way to get the first author listed without the et-al term, come to think of it. Try setting et-al-min="1" and et-al-use-first="1". When the two have the same (non-zero) value, the et-al term is left out automatically (and any subsequent rendering of the target name variable will leave out the rendered name(s)). This is not behavior defined in the CSL specification, though, so implementing it by quashing the et-al term itself is the better choice.
  • I am answering in the other thread.
  • edited March 29, 2011
    I have a fix in place for the year-suffix delimiter issue, and am bundling up the code for a new processor release. With luck, the revised processor will make it into Zotero 2.1.2, coming out rather soon.

    (Edit: for posterity, the other thread is here)
  • I have the same problem as Olaf.mandel. But still with the latest branch version and also with the Multilanguage version. I get with the "year-suffix-delimiter” option the same described result (Silk 1992aundefinedb). Is the fix already available or did I something wrong? My code section looks the same as olaf.mandel posted above.
    Thanks a lot in advance
  • The bug has been fixed as far as I know; Olaf's example is used as test code for the fix, and the test passes. If you would like one of us to take a look at your code, please post it to http://gist.github.com/ as a public gist, and post the URL from the address bar back here.
  • edited April 8, 2011
    Yes it would be great if someone can take a look at it. The URL is: https://gist.github.com/909460
    Thank you very much.
  • There was a syntax error in the file, which probably caused the bad output. The year-suffix-delimiter attribute is not valid in CSL 0.8.1, so converting the file to CSL 1.0 (which Zotero 2.1 does internally) would have either left the option behind or done something weird.

    Here is a version of the file in valid CSL 1.0, with the year-suffix-delimiter added back. If you use this for your style and discard the 0.8.1 version, things should work smoothly.

    https://gist.github.com/909537
  • Hi Frank, i tested the code but it doesn’t work. It looks the same as before. Any idea?
    Thanks a lot.
  • Have you tried switching away from the style and then switching back? Sorry if that's an obvious question, but the style works fine here, so I'm looking for reasons. Also (another obvious question, sorry) can you check again, just to be sure, in gear menu -> About Zotero to see that your client really is version 2.1.5?
  • To all and sundry: it would also be good to know if the style works elsewhere.

    (If anyone listening in can give the file linked above a try ... with two entries with identical authors, does it render correctly, or does "undefined" appear in the output of citations with a year-suffix?)
  • I tried everything you said and more also with the latest 2.1.6 branch and also with your multilang. But it looks everywhere the same (Silk 1992aundefinedb). If i take out the part “year-suffix-delimiter=","” than it looks not as I want but healthy (Silk 1992ab).
  • Ah, there was one other thing I noticed. Save the file with all lowercase characters and no space in the filename, like "molecular-ecology.csl". Uppercase and non-ascii characters are not allowed in style filenames, and the installation itself may have been failing on you.
  • Sorry, but nothing works. I also tried a completely fresh firefox and zotero installation, the above mentioned file name changes - but nothing – the same "undefined" result. I hope you have some more ideas.

    Sorry, but only to be sure that we mean the same: "same author and same year" (Silk 1992aundefinedb). If it is only the same author everything is fine (Silk 1993; 1994). But I’m sure you get this, because the year-suffix-delimiter is exactly for the first problem (as i understood).

    One thing more it is more an information and I think it is not influencing the issue above but just to be complete: a few days ago I opened a discussion http://forums.zotero.org/discussion/17446/multiple-citation-separators it is regarding the same style I’m trying to build. In the end I would like to have something like: (Anderson 2011; Acecedo-Whitehouse et al. 2003, 2006; Silk 1992a,b).

    Thanks a lot!
  • edited April 9, 2011
    I'll keep looking at this. There must be some difference between our systems or test data that I've not hit yet. (The other delimiters issue will be solved in 2.1.6.)

    Let's give this issue some time. If anyone comes across this thread, it would be very helpful if someone else could install the style at https://gist.github.com/909537, and let us know if it renders normally with two same-author / same-year citations, or spits out an "undefined" where the delimiter should be. Testing by more than just me and Primate Kin Selectio would tell us which of our respective results (success vs failure) are due to peculiarities in our local systems.
  • Ok thanks. Hopefully we find somebody who is willing to help us. I'll keep trying something. My last try was within my linux system but the same. Could it be that it has something to do with the BS system language? My one is german.
  • edited April 9, 2011
    Interesting thought. I'll try with alternative locales.

    (Edit: No joy, still works like a charm.)
  • I can reproduce with that style on the latest trunk (with citeproc-js 1.0.147), although it works fine in APA.
  • Hi Simon what you mean with reproduce? The error I observed or franks correct result?
  • The error you observed. I get
    (Smith 2007aundefinedb)
  • Ok i feel little bit reassured, that this is not only my fault. But where is the solution It seems that frank has one but how could we generalize it?
  • Found it. Thanks to Simon for confirming; I needed a little push to get past a stupid mistake I was making in testing. I've found the error in the code (which was also a simple mistake). This will be fixed in the next release.

    @Primate Kin Selectio: Ideally, clear formatting errors like this should be cleared very quickly. The turnaround was a bit slow for this one; thank you for your patience.
  • That sounds very good. Does that mean I can use the above code and i have only to wait for the next release?

    And i think it was very fast within one day you found a solution. Great! thank you and also simon a lot.
  • Yes, the code is fine; the error was entirely due to the processor bug. The "undefined" string should never appear in processor output, unless it's an actual string provided by the style or the items being rendered.
  • Great! And like i said in my other thread I'm looking forward for the citeproc update. Thanks a lot!
Sign In or Register to comment.