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
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
https://gist.github.com/tipichris/7794451
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.
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.
@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.
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.)
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.
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>
I agree with your simplification. Yes, the code needs cleaning up.
<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>