Logic: Check for multiple works by same author
I'm working on updating the McGill Guide for legal citation, and I've run into a problem. The guide specifies that subsequent references to an author's work should in general only mention the author's name (Eg. 23. Murphy, supra note 3 at 203) — UNLESS there are multiple works by the same author. In that case the rule is to mention the author's name and the work's short title (Eg. 23. Murphy, "Law stuff", supra note 3 at 203).
I'm getting comfortable writing conditions in CSL, but I'm not sure how to write an if-then logic that checks for whether there are multiple works by the same author.
Any tips?
I'm getting comfortable writing conditions in CSL, but I'm not sure how to write an if-then logic that checks for whether there are multiple works by the same author.
Any tips?
The MHRA style does exactly what you want:
https://github.com/citation-style-language/styles/blob/master/modern-humanities-research-association.csl#L100
It's possible, though, that the inclusion of a supra note will screw with that (since, with the supra, the citations aren't technically ambiguous anymore). In that case I don't think it's going to be possible to implement. Not sure, though - you'll have to test.
I'll have to play around with this.
FYI the code was:
<macro name="mcgill-secondary-subsequent-default">
<choose>
<if disambiguate="true">
<group delimiter=", ">
<text macro="mcgill-contributors-short"/>
<text macro="mcgill-title-short"/>
</group>
</if>
<else>
<group delimiter=", ">
<text macro="mcgill-contributors-short"/>
</group>
</else>
</choose>
</macro>
https://github.com/citation-style-language/styles/blob/master/CONTRIBUTING.md
for something as complex as the McGill guide, we'd very much ask for a pull request, which greatly facilitates review.
Sorry if off-topic.
AW