Disambiguate subsequent citations with title

Dear all,

I am currently editing a style of mine (which I derived from a previous, excellent style by other authors, though with heavy changes). Until now I had not much trouble doing that, but I now face a (probably easily solved) difficulty: I want subsequent citations of works by the same author to be disambiguated only if another work by that author has been cited in the meantime.

That may not be clear, so let me offer an example.

Note 1: Name, G., « Title », <i>Journal</i>, vol. 1, n. 1, 9999, p. 111-999.

Note 2: <i>Ibid.</i> <!--That works fine-->

Note 3: Name, G., « Other stuff », <i>Review</i>, vol. 2, n. 2, 8888, p. 222-888.

Note 4: Name, G., « Title », art. cit. <!--So that the reader can know which paper I am referring to: “Title”, rather than “Other stuff”: currently it only indicates “art. cit.”-->

Currently the code for subsequent citations reads:

<else-if position="subsequent">
<text macro="author"/>
<choose>
<if match="any" disambiguate="true">
<text variable="title"/>
</if>
</choose>
<choose>
<if type="book report article" match="any">
<text term="opus-citatum" font-style="italic"/>
</if>
<else-if type="article-journal entry-encyclopedia article-newspaper chapter" match="any">
<text term="article-cited"/>
</else-if>
<else>
<text term="opus-citatum"/>
</else>
</choose>
</else-if>

(I hope that code is not excessively dirty, so to speak. I am still a beginner!)

Thanks for your help!
  • Note that opus-citatum and article-cited are not CSL terms:
    http://docs.citationstyles.org/en/stable/specification.html#appendix-ii-terms

    <text term="opus-citatum"/> may work, but it's invalid CSL and there's always a chance it will break things.

    Otherwise what you have looks fine, but note that if disambiguate="true" evaluates the whole citation, so if one of the two has art. cit. and the other one op. cit. it'd not trigger.
    (For that reason, it's always better to provide actual examples of output rather than stylized versions when asking questions -- lots of little details can matter).
Sign In or Register to comment.