Multiple papers from same author in same year

Hello, I use style from our faculty. I just need to fix two things:

1) sort authors in text citation by year (if same author in same year, than "a" goes before "b"), not by name:

- example (Alfa 2010a; Alfa 2010b; Beta 2011)

2) In bibliography I have something like this:

Alfa A., Beta B. (2010):(a): Name ....
Alfa A., Beta B. (2010):(b): Name ....

I would like to have something like this:

Alfa A., Beta B. (2010a): Name ....
Alfa A., Beta B. (2010b): Name ....


Here is my style:

</info>
<locale>
<terms>
<term name="from">z</term>
</terms>
</locale>
<macro name="container">
<choose>
<if type="chapter paper-conference" match="any">
<text term="in" prefix=", " suffix=": "/>
<names variable="editor translator" delimiter=", " suffix=", ">
<name name-as-sort-order="all" sort-separator=", " initialize-with="." delimiter=", " delimiter-precedes-last="always"/>
<label form="short" text-case="capitalize-first" prefix=" (" suffix=")"/>
</names>
<group delimiter=", ">
<text variable="container-title" text-case="title"/>
<text variable="collection-title" text-case="title"/>
</group>
</if>
<else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
<group prefix=", " delimiter=", ">
<text variable="container-title"/>
<text variable="collection-title"/>
</group>
</else-if>
<else>
<group prefix=". " delimiter=", ">
<text variable="container-title" font-style="italic"/>
<text variable="collection-title"/>
</group>
</else>
</choose>
</macro>
<macro name="author">
<names variable="author" font-variant="normal">
<name font-style="normal" font-weight="normal" delimiter-precedes-last="always" initialize-with=". " name-as-sort-order="all" sort-separator=" "/>
<label form="short" text-case="capitalize-first" prefix=" (" suffix=")"/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<text macro="title"/>
</substitute>
</names>
</macro>
<macro name="author-short">
<names variable="author" font-style="normal">
<name form="short" and="text" delimiter=", " initialize-with=". "/>
<et-al font-style="italic"/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<choose>
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
<text variable="title" form="short"/>
</if>
<else>
<text variable="title" form="short" quotes="true"/>
</else>
</choose>
</substitute>
</names>
</macro>
<macro name="title">
<choose>
<if type="report thesis" match="any">
<text variable="title"/>
<group prefix=" (" suffix=")" delimiter=" ">
<text variable="genre"/>
<text variable="number" prefix="No. "/>
</group>
</if>
<else-if type="bill book graphic legal_case legislation motion_picture report song speech" match="any">
<text variable="title" strip-periods="false"/>
<text macro="edition" prefix=", "/>
</else-if>
<else-if type="webpage">
<text variable="title"/>
<text value="WWW Document" prefix=" [" suffix="]"/>
</else-if>
<else>
<text variable="title"/>
</else>
</choose>
</macro>
<macro name="publisher">
<group delimiter=", ">
<text variable="publisher"/>
<text font-style="italic" variable="publisher-place"/>
</group>
</macro>
<macro name="event">
<choose>
<if variable="event">
<text term="presented at" text-case="capitalize-first" suffix=" "/>
<text variable="event"/>
</if>
</choose>
</macro>
<macro name="issued-inline_citation">
<choose>
<if variable="issued">
<date variable="issued">
<date-part name="year"/>
</date>
</if>
<else>
<text term="no date" form="short"/>
</else>
</choose>
</macro>
<macro name="edition">
<group delimiter=" ">
<choose>
<if is-numeric="edition">
<number variable="edition" form="ordinal"/>
</if>
<else>
<text variable="edition" suffix="."/>
</else>
</choose>
<text value="ed"/>
</group>
</macro>
<macro name="locators">
<choose>
<if type="article-journal article-magazine article-newspaper" match="any">
<group prefix=" " delimiter=", ">
<group>
<text font-weight="bold" variable="volume"/>
</group>
<text variable="page"/>
</group>
</if>
<else-if type="bill book graphic legal_case legislation motion_picture report song thesis" match="any">
<group delimiter=", " prefix=". ">
<text macro="event"/>
<text macro="publisher"/>
</group>
</else-if>
<else-if type="chapter paper-conference" match="any">
<group delimiter=", " prefix=". ">
<text macro="event"/>
<text macro="publisher"/>
<group>
<label variable="page" form="short" suffix=" "/>
<text variable="page"/>
</group>
</group>
</else-if>
<else-if type="patent">
<text variable="number" prefix=". "/>
</else-if>
</choose>
</macro>
<macro name="issued-bibliography">
<choose>
<if match="all" variable="issued">
<date variable="issued">
<date-part name="year" prefix="(" suffix="): "/>
</date>
</if>
<else>
<text term="no date" form="short"/>
</else>
</choose>
</macro>
<citation et-al-min="3" et-al-use-first="1" disambiguate-add-givenname="true" disambiguate-add-year-suffix="true" collapse="year" cite-group-delimiter=", ">
<sort>
<key macro="author"/>
<key macro="issued" sort="descending"/>
</sort>
<layout prefix="(" suffix=")" delimiter="; ">
<group delimiter=", ">
<text macro="author-short"/>
<text macro="issued-inline_citation"/>
<group delimiter=" ">
<label variable="locator" form="short"/>
<text variable="locator"/>
</group>
</group>
</layout>
</citation>
<bibliography hanging-indent="true" entry-spacing="0" line-spacing="1">
<sort>
<key macro="author"/>
<key macro="issued" sort="descending"/>
</sort>
<layout>
<group suffix=".">
<text macro="author"/>
<text macro="issued-bibliography" prefix=" "/>
<group>
<text macro="title"/>
<text macro="container"/>
<text macro="locators"/>
</group>
</group>
</layout>
</bibliography>
</style>




Thank you very much!
  • 1. In the _first_ instance of
    <sort>
    <key macro="author"/>
    <key macro="issued" sort="descending"/>
    </sort>
    switch the 2nd and 3rd line. It's important you don't do this for the 2nd instance, as that would ruin sorting in your bibliography.


    2.
    <date variable="issued">
    <date-part name="year" prefix="(" suffix="): "/>
    </date>

    should be

    <date variable="issued" prefix="(" suffix="): ">
    <date-part name="year"/>
    </date>
  • Thank you, first part of my problem is almost solved.

    Anyway another issue is still here:
    - Authors in the brackets are not sorted by year issued but by their last name
    --- so it is (Alfa 2010; Beta 2008; etc)
    --- it should be (Beta 2008; Alfa 2010; etc) or in a case of two same papers in same year from same author (Beta 2008; Alfa 2010a; Alfa 2010b; etc)

    - in bibliography report
    --- Now I can see
    Alfa A., Beta B. (2010b): Name ....
    Alfa A., Beta B. (2010a): Name ....
    BUT their are switched - "a" should be before "b" etc

    Thank you very much!

    My edited style:
    <locale>
    <terms>
    <term name="from">z</term>
    </terms>
    </locale>
    <macro name="container">
    <choose>
    <if type="chapter paper-conference" match="any">
    <text term="in" prefix=", " suffix=": "/>
    <names variable="editor translator" delimiter=", " suffix=", ">
    <name name-as-sort-order="all" sort-separator=", " initialize-with="." delimiter=", " delimiter-precedes-last="always"/>
    <label form="short" text-case="capitalize-first" prefix=" (" suffix=")"/>
    </names>
    <group delimiter=", ">
    <text variable="container-title" text-case="title"/>
    <text variable="collection-title" text-case="title"/>
    </group>
    </if>
    <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
    <group prefix=", " delimiter=", ">
    <text variable="container-title"/>
    <text variable="collection-title"/>
    </group>
    </else-if>
    <else>
    <group prefix=". " delimiter=", ">
    <text variable="container-title" font-style="italic"/>
    <text variable="collection-title"/>
    </group>
    </else>
    </choose>
    </macro>
    <macro name="author">
    <names variable="author" font-variant="normal">
    <name font-style="normal" font-weight="normal" delimiter-precedes-last="always" initialize-with=". " name-as-sort-order="all" sort-separator=" "/>
    <label form="short" text-case="capitalize-first" prefix=" (" suffix=")"/>
    <substitute>
    <names variable="editor"/>
    <names variable="translator"/>
    <text macro="title"/>
    </substitute>
    </names>
    </macro>
    <macro name="author-short">
    <names variable="author" font-style="normal">
    <name form="short" and="text" delimiter=", " initialize-with=". "/>
    <et-al font-style="italic"/>
    <substitute>
    <names variable="editor"/>
    <names variable="translator"/>
    <choose>
    <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
    <text variable="title" form="short"/>
    </if>
    <else>
    <text variable="title" form="short" quotes="true"/>
    </else>
    </choose>
    </substitute>
    </names>
    </macro>
    <macro name="title">
    <choose>
    <if type="report thesis" match="any">
    <text variable="title"/>
    <group prefix=" (" suffix=")" delimiter=" ">
    <text variable="genre"/>
    <text variable="number" prefix="No. "/>
    </group>
    </if>
    <else-if type="bill book graphic legal_case legislation motion_picture report song speech" match="any">
    <text variable="title" strip-periods="false"/>
    <text macro="edition" prefix=", "/>
    </else-if>
    <else-if type="webpage">
    <text variable="title"/>
    <text value="WWW Document" prefix=" [" suffix="]"/>
    </else-if>
    <else>
    <text variable="title"/>
    </else>
    </choose>
    </macro>
    <macro name="publisher">
    <group delimiter=", ">
    <text variable="publisher"/>
    <text font-style="italic" variable="publisher-place"/>
    </group>
    </macro>
    <macro name="event">
    <choose>
    <if variable="event">
    <text term="presented at" text-case="capitalize-first" suffix=" "/>
    <text variable="event"/>
    </if>
    </choose>
    </macro>
    <macro name="issued-inline_citation">
    <choose>
    <if variable="issued">
    <date variable="issued">
    <date-part name="year"/>
    </date>
    </if>
    <else>
    <text term="no date" form="short"/>
    </else>
    </choose>
    </macro>
    <macro name="edition">
    <group delimiter=" ">
    <choose>
    <if is-numeric="edition">
    <number variable="edition" form="ordinal"/>
    </if>
    <else>
    <text variable="edition" suffix="."/>
    </else>
    </choose>
    <text value="ed"/>
    </group>
    </macro>
    <macro name="locators">
    <choose>
    <if type="article-journal article-magazine article-newspaper" match="any">
    <group prefix=" " delimiter=", ">
    <group>
    <text font-weight="bold" variable="volume"/>
    </group>
    <text variable="page"/>
    </group>
    </if>
    <else-if type="bill book graphic legal_case legislation motion_picture report song thesis" match="any">
    <group delimiter=", " prefix=". ">
    <text macro="event"/>
    <text macro="publisher"/>
    </group>
    </else-if>
    <else-if type="chapter paper-conference" match="any">
    <group delimiter=", " prefix=". ">
    <text macro="event"/>
    <text macro="publisher"/>
    <group>
    <label variable="page" form="short" suffix=" "/>
    <text variable="page"/>
    </group>
    </group>
    </else-if>
    <else-if type="patent">
    <text variable="number" prefix=". "/>
    </else-if>
    </choose>
    </macro>
    <macro name="issued-bibliography">
    <choose>
    <if match="all" variable="issued">
    <date variable="issued" prefix="(" suffix="): ">
    <date-part name="year"/>
    </date>
    </if>
    <else>
    <text term="no date" form="short"/>
    </else>
    </choose>
    </macro>
    <citation et-al-min="3" et-al-use-first="1" disambiguate-add-givenname="true" disambiguate-add-year-suffix="true" collapse="year" cite-group-delimiter=", ">
    <sort>
    <key macro="issued" sort="descending"/>
    <key macro="author"/>
    </sort>
    <layout prefix="(" suffix=")" delimiter="; ">
    <group delimiter=", ">
    <text macro="author-short"/>
    <text macro="issued-inline_citation"/>
    <group delimiter=" ">
    <label variable="locator" form="short"/>
    <text variable="locator"/>
    </group>
    </group>
    </layout>
    </citation>
    <bibliography hanging-indent="true" entry-spacing="0" line-spacing="1">
    <sort>
    <key macro="author"/>
    <key macro="issued" sort="descending"/>
    </sort>
    <layout>
    <group suffix=".">
    <text macro="author"/>
    <text macro="issued-bibliography" prefix=" "/>
    <group>
    <text macro="title"/>
    <text macro="container"/>
    <text macro="locators"/>
    </group>
    </group>
    </layout>
    </bibliography>
    </style>
  • oh sorry, this

    <key macro="issued" sort="descending"/>

    should say sort="ascending" instead of descending. (It is sorting by date, just in the opposite order you want it to).
  • edited December 2, 2015
    OK, I changed it in the both instances. Thank you very much!

    Last issue - if I have paper with only two authors and two citations, it doesnt follow sort attribute "issued" in text citation.

    example:
    (Alfa and Zeta, 2012; Beta et al. 2009) should be shown as (Beta et al. 2009; Alfa and Zeta, 2012)... but it is not
  • it definitely should. Have you tried inserting a new citation with just those two (or to representative ones) to make sure it's still working?
  • OK, I think it is an issue in Microsoft Office addon - you have to manually delete and add this kind of citation to reflect your sorting :) Thank you very much for your help!
  • Here is my final version of my edited style, could you please check it if everything is OK? Thank you for your time!

    <locale>
    <terms>
    <term name="from">z</term>
    </terms>
    </locale>
    <macro name="container">
    <choose>
    <if type="chapter paper-conference" match="any">
    <text term="in" prefix=", " suffix=": "/>
    <names variable="editor translator" delimiter=", " suffix=", ">
    <name name-as-sort-order="all" sort-separator=", " initialize-with="." delimiter=", " delimiter-precedes-last="always"/>
    <label form="short" text-case="capitalize-first" prefix=" (" suffix=")"/>
    </names>
    <group delimiter=", ">
    <text variable="container-title" text-case="title"/>
    <text variable="collection-title" text-case="title"/>
    </group>
    </if>
    <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
    <group prefix=", " delimiter=", ">
    <text variable="container-title"/>
    <text variable="collection-title"/>
    </group>
    </else-if>
    <else>
    <group prefix=". " delimiter=", ">
    <text variable="container-title" font-style="italic"/>
    <text variable="collection-title"/>
    </group>
    </else>
    </choose>
    </macro>
    <macro name="author">
    <names variable="author" font-variant="normal">
    <name font-style="normal" font-weight="normal" delimiter-precedes-last="always" initialize-with=". " name-as-sort-order="all" sort-separator=" "/>
    <label form="short" text-case="capitalize-first" prefix=" (" suffix=")"/>
    <substitute>
    <names variable="editor"/>
    <names variable="translator"/>
    <text macro="title"/>
    </substitute>
    </names>
    </macro>
    <macro name="author-short">
    <names variable="author" font-style="normal">
    <name form="short" and="text" delimiter=", " initialize-with=". "/>
    <et-al font-style="italic"/>
    <substitute>
    <names variable="editor"/>
    <names variable="translator"/>
    <choose>
    <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
    <text variable="title" form="short"/>
    </if>
    <else>
    <text variable="title" form="short" quotes="true"/>
    </else>
    </choose>
    </substitute>
    </names>
    </macro>
    <macro name="title">
    <choose>
    <if type="report thesis" match="any">
    <text variable="title"/>
    <group prefix=" (" suffix=")" delimiter=" ">
    <text variable="genre"/>
    <text variable="number" prefix="No. "/>
    </group>
    </if>
    <else-if type="bill book graphic legal_case legislation motion_picture report song speech" match="any">
    <text variable="title" strip-periods="false"/>
    <text macro="edition" prefix=", "/>
    </else-if>
    <else-if type="webpage">
    <text variable="title"/>
    <text value="WWW Document" prefix=" [" suffix="]"/>
    </else-if>
    <else>
    <text variable="title"/>
    </else>
    </choose>
    </macro>
    <macro name="publisher">
    <group delimiter=", ">
    <text variable="publisher"/>
    <text font-style="italic" variable="publisher-place"/>
    </group>
    </macro>
    <macro name="event">
    <choose>
    <if variable="event">
    <text term="presented at" text-case="capitalize-first" suffix=" "/>
    <text variable="event"/>
    </if>
    </choose>
    </macro>
    <macro name="issued-inline_citation">
    <choose>
    <if variable="issued">
    <date variable="issued">
    <date-part name="year"/>
    </date>
    </if>
    <else>
    <text term="no date" form="short"/>
    </else>
    </choose>
    </macro>
    <macro name="edition">
    <group delimiter=" ">
    <choose>
    <if is-numeric="edition">
    <number variable="edition" form="ordinal"/>
    </if>
    <else>
    <text variable="edition" suffix="."/>
    </else>
    </choose>
    <text value="ed"/>
    </group>
    </macro>
    <macro name="locators">
    <choose>
    <if type="article-journal article-magazine article-newspaper" match="any">
    <group prefix=" " delimiter=", ">
    <group>
    <text font-weight="bold" variable="volume"/>
    </group>
    <text variable="page"/>
    </group>
    </if>
    <else-if type="bill book graphic legal_case legislation motion_picture report song thesis" match="any">
    <group delimiter=", " prefix=". ">
    <text macro="event"/>
    <text macro="publisher"/>
    </group>
    </else-if>
    <else-if type="chapter paper-conference" match="any">
    <group delimiter=", " prefix=". ">
    <text macro="event"/>
    <text macro="publisher"/>
    <group>
    <label variable="page" form="short" suffix=" "/>
    <text variable="page"/>
    </group>
    </group>
    </else-if>
    <else-if type="patent">
    <text variable="number" prefix=". "/>
    </else-if>
    </choose>
    </macro>
    <macro name="issued-bibliography">
    <choose>
    <if match="all" variable="issued">
    <date variable="issued" prefix="(" suffix="): ">
    <date-part name="year"/>
    </date>
    </if>
    <else>
    <text term="no date" form="short"/>
    </else>
    </choose>
    </macro>
    <citation et-al-min="3" et-al-use-first="1" disambiguate-add-givenname="true" disambiguate-add-year-suffix="true" collapse="year" cite-group-delimiter=", ">
    <sort>
    <key macro="issued" sort="ascending"/>
    <key macro="author"/>
    </sort>
    <layout prefix="(" suffix=")" delimiter="; ">
    <group delimiter=", ">
    <text macro="author-short"/>
    <text macro="issued-inline_citation"/>
    <group delimiter=" ">
    <label variable="locator" form="short"/>
    <text variable="locator"/>
    </group>
    </group>
    </layout>
    </citation>
    <bibliography hanging-indent="true" entry-spacing="0" line-spacing="1">
    <sort>
    <key macro="author"/>
    <key macro="issued" sort="ascending"/>
    </sort>
    <layout>
    <group suffix=".">
    <text macro="author"/>
    <text macro="issued-bibliography" prefix=" "/>
    <group>
    <text macro="title"/>
    <text macro="container"/>
    <text macro="locators"/>
    </group>
    </group>
    </layout>
    </bibliography>
    </style>
  • I think trying to change to a different style and back would work, too, but not sure.

This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.

Sign In or Register to comment.