Add title-short to disambiguate in subsequent citations

edited November 20, 2018
Hi,

I am trying to customize a style, which I found in Zotero Style Database.

Basically, according to my guidelines, a book/article should be cited only by its author and the page number. However, when there are two or more books/articles from the same author in the bibliography, a citation field must also contain title/short title information in order to disambiguate the cited works of the same author.

I am trying to achieve this goal by using conditional disambiguate true argument under contributors-short macro. But it brings nothing. Short-title is not printed for the works of the same author.

Or should/can I maybe activate title-short field under Citation and deactivate it for the authors with sole works?

Any help will be appreciated.

Here is the relevant part of the code:

<macro name="contributors-short">
<group delimiter="/">
<names variable="author">
<name form="short" delimiter-precedes-et-al="never" delimiter-precedes-last="always" font-weight="bold" delimiter="/" initialize-with="."/>
<substitute>
<names variable="editor collection-editor director editorial-director" font-weight="bold"/>
<names variable="translator" font-weight="bold"/>
</substitute>
</names>
<choose>
<if disambiguate="true">
<text macro="title-short"/>
</if>
</choose>
</group>
</macro>

<citation et-al-min="4" et-al-use-first="1" disambiguate-add-names="true" disambiguate-add-givenname="true" givenname-disambiguation-rule="primary-name-with-initials">
<layout suffix="." delimiter="; ">
<choose>
<if match="any" position="subsequent">
<group delimiter=", ">
<text macro="contributors-short"/>
<group delimiter="/">
<group delimiter=", ">
<!--text macro="title-short"/-->
<text macro="date-disambiguate"/>
<text macro="case-locator-subsequent"/>
</group>
<text macro="case-pinpoint-subsequent"/>
</group>
<choose>
<if match="none" type="legal_case">
<text macro="point-locators-subsequent"/>
</if>
</choose>
</group>
</if>
<else>
<group delimiter=", ">
<group delimiter=", ">
<group delimiter=", ">
<group delimiter=" ">
<group delimiter=", ">
<group delimiter=" ">
<group delimiter=", ">
<group delimiter=", ">
<text macro="contributors-note"/>
<text macro="title-note" suffix=","/>
</group>
<text macro="description-note"/>
<text macro="container-title-note" suffix=","/>
<text macro="secondary-contributors-note"/>
<text macro="container-contributors-note"/>
</group>
<text macro="locators-note-join-with-space"/>
</group>
<text macro="locators-note-join-with-comma"/>
<text macro="collection-title"/>
<text macro="issue-note-join-with-comma"/>
</group>
<text macro="issue-note-join-with-space"/>
</group>
<text macro="locators-newspaper"/>
<text macro="point-locators-join-with-comma"/>
</group>
<text macro="point-locators-join-with-colon"/>
</group>
<text macro="access-note"/>
</group>
</else>
</choose>
</layout>
</citation>

  • You need to warp code between <code> </code> HTML tags
  • edited November 20, 2018
    Thank you for the info. I edited the message accordingly.
  • Generally this should work. I'd want to see the whole style before I can say more.
    Post to hastebin.com, create a new bin, and post the link here.
  • edited November 22, 2018
    I couldn't get the hastebin to work. I got error messages. Therefore, I put the code on Github:

    https://gist.github.com/ah-dagdelen/058635281d714aa9091b42fac4a0498b

    Is it possible that the problem is caused because of the contributors-note macro? The first inline citation of a work must contain all the information about it.

    Edit: Today, it worked:
    https://hastebin.com/exigitehol.xml
  • edited December 30, 2018
    Ok, I found the problem causing hassle.

    The macro "point-locators-subsequent" prohibits disambiguation as the works of the same authors was being distinguished by adding locators, e.g. page, paragraph.

    I found the following macro in the Mrha-Style, which also contains a code block for conditional rendering for disambiguation, and imported into the style which I was customizing.

    <macro name="point-locators-subsequent">
    <label variable="locator" form="short" prefix="" suffix=" "/>
    <text variable="locator"/>
    </macro>
Sign In or Register to comment.