Disambiguation and disappearing initials

I need to make a slight change to the harvard-coventry-university style sheet. Where multiple authors with the same surname are cited in a paper, these should be disambiguated by adding initials after the surname.

I have tried adding these attributes to the <citation> element:

disambiguate-add-givenname="true" givenname-disambiguation-rule="all-names-with-initials" name-as-sort-order="all"

which seems to have the desired effect on citations. But the very much not desired side effect of removing all initials from the bibliography, except for those authors who share surnames. I've tried an explicit form="long" attribute in the relevant part of the author macro, but to no avail.

Can anyone see the problem?

Thanks
  • might be a bug. To be sure, could you put the version of the style that produces that on a public gist at gist.github.com and link to it here?
  • OK, it's here:

    https://gist.github.com/tipichris/7794451
  • it's a bug - I'll work with Frank to track down the details, but you can just set givenname-disambiguation-rule="all-names" - since you already have initialize=". " in the author-short macro that should do it.

    Are you sure, btw., that you want all names to be disambiguated? That's quite rare and produces a lot of initials, especially where you have long author lists.
  • Thanks, that seems to work.

    all-names doesn't actually seem to add an initial to all names, just to all the ambiguous ones. So with all-names I get:

    (Phillips and Smith, A. 2010)
    (Smith, P. C. and Street 2007)
    (Smith, P. C. 2009)
    (Skelcher et al. 2005)
    (Smith, N. 2011)

    whilst with primary-name I get

    (Phillips and Smith 2010)
    (Smith, P. C. and Street 2007)
    (Smith, P. C. 2009)
    (Skelcher et al. 2005)
    (Smith, N. 2011)

    which crucially doesn't disambiguate the Smith as a second author in the first citation. The style guide isn't actually specific about this, but the context would seem to suggest that it is disambiguating authors, rather than citations, which is considered important.
  • I have no insight, obviously, in what the guide requires - all I can say is that we used to have all-names as the default and received tons of complaints (it's now by-cite)
  • A bug indeed. The *-with-initials parameters were restricting the bibliography, as tipichris discovered. It should be fixed in the processor patch plugin now. The plugin (which works only in Zotero with Firefox, not with Standalone) swaps in the latest processor version: it can and should be removed at the next Zotero release.

    @tipichris: The all-names and primary-name rules are behaving normally. These are meant to force disambiguation of all ambiguous names, regardless of whether additional information is needed to disambiguate a given cite. The specification gives a clear description of their effect. In the case of the primary-name rule, only the first name in a series is affected, so cite-level disambiguation may be incomplete, as you noted. Some styles require that behaviour -- in such styles, remaining ambiguity would be removed using a year-suffix.

    The rules ending in *-with-initials restrict expansion to initials only. So two names "John Smith" and "Joseph Smith" will both render as "J. Smith" in citations when one of these rules is used.
  • well OK, "work with Frank" may have been a euphemism for have Frank do the work here ;) - FWIW, I agree that all the disambiguation settings are working correctly.
  • Pinning down the fault is crucial mid-field play!
  • I may have run into a different flavor of this same bug.

    In my case, I can attribute failure-to-initialize and/or failure-to-disambiguate to the combination of cs:choose based on position and disambiguation. (Initialization and/or disambiguation don't always fail, but when they do, removing the cs:choose based on the position does solve the issue.)
  • minimal test cases are the most helpful thing to figure out a bug.
  • I did, but still couldn't pin down the culprit.

    Below is a barebone style with codes for just books and journal articles.
    https://gist.github.com/anonymous/8703623

    It passed the CSL-m validator too. What I want to achieve is to fully spell out the authors name in the first citation, and initialize given names in subsequent citations. But it won't initialize the author names in subsequent citations. If I initialize the first occurrence too, then subsequent citations are initialized too.
  • you have near-note-distance set to 1000. I assume that will basically never evaluate to true, so you're always getting foreign-book-first (or foreign-periodical-first.


    Since you mentioned being interested in efficiency:
    <macro name="foreign-periodical">
    <choose>
    <if position="first">
    <text macro="foreign-periodical-first" />
    </if>
    <else-if position="ibid">
    <choose>
    <if position="ibid-with-locator">
    <text value="Ibid" font-style="italic" suffix=".," />
    <label form="short" variable="locator" />
    <text variable="locator" />
    </if>
    <else-if position="ibid">
    <text value="Ibid" font-style="italic" />
    </else-if>
    </choose>
    </else-if>
    <else-if position="near-note">
    <text macro="foreign-secondary-subsequent" />
    </else-if>
    <else>
    <text macro="foreign-periodical-first" />
    </else>
    </choose>
    </macro>


    is the same as the significantly simpler

    <macro name="foreign-periodical">
    <choose>
    <if position="ibid-with-locator">
    <text value="Ibid" font-style="italic" suffix=".," />
    <label form="short" variable="locator" />
    <text variable="locator" />
    </if>
    <else-if position="ibid">
    <text value="Ibid" font-style="italic" />
    </else-if>
    <else-if position="near-note">
    <text macro="foreign-secondary-subsequent" />
    </else-if>
    <else>
    <text macro="foreign-periodical-first" />
    </else>
    </choose>
    </macro>
  • edited January 30, 2014
    Actually, with the near-note-distance so large, I always get "near-note" . (I set an artificially large number for testing.) If you try it, you will see it immediately. Only the first citation passes through foreign-periodical-first and the rest goes through macro:foreign-secondary-subsequent, without initialization that's built into macro:foreign-secondary-subsequent.

    I agree with your simplification. Yes, the code needs cleaning up.
  • edited January 30, 2014
    I almost accidentally found that adding position="subsequent" solved my issue of non-initialization. I'm not sure why the absence of position="subsequent" affected the initialization. (I set the near-note-distance so high that nothing was going to fall through the cracks and needed the position="subsequent" element. If that was the case, I would have run into an error anyway.)


    <macro name="foreign-periodical">
    <choose>
    <if position="ibid-with-locator">
    <text value="Ibid" font-style="italic" suffix=".," />
    <label form="short" variable="locator" />
    <text variable="locator" />
    </if>
    <else-if position="ibid">
    <text value="Ibid" font-style="italic" />
    </else-if>
    <else-if position="first">
    <text macro="foreign-periodical-first"/>
    </else-if>
    <else-if position="near-note">
    <text macro="foreign-secondary-subsequent" />
    </else-if>
    <else-if position="subsequent">
    <text macro="foreign-periodical-subsequent" />
    </else-if>
    </choose>
    </macro>
Sign In or Register to comment.