Export bibliography using nested sorting by date and within alphabetical author

Hi,

Curious if there is a way using the application or the web version of Zotero, where you can create a sorted bibliography that is sorted by author first and then by date or vice versa, so that the second sort still keeps in mind the first sort in alphabetical order?

Thanks!
  • Sorry, I don't quite understand, could you give an example? It does sound like it'd be very much possible, but I don't know what "the second sort still keeps in mind the first sort in alphabetical order?" means?
  • The sort would be similar to Excel, so the outcome would be files sorted by year, then alphabetically by creator. This way data can be lumped by year, but maintain alphabetical sort order within years. For example:
    green et al. 2024
    red et al. 2024
    blue et al. 2023
    purple et al. 2023
    Currently, it appears that sorting by year doesn't maintain a logical system for creating a bibliography for a specific year that is alphabetical by author.
  • In a citation style you'd just flip the two conditions, so it would looks something like

    <sort>
    <key macro="year-date"/>
    <key macro="author" sort="descending"/>
    </sort>


    the names of the macros will vary by style, of course. Which one are you working with?
  • Thanks for the response! We are using the Nature export style.
  • edited October 3, 2024
    @adamsmith, so am I editing the style correctly here based on what your saying?
    https://s3.amazonaws.com/zotero.org/images/forums/u7005503/v0bh95oi9femsmkt14h0.jpg
  • You'd want to remove the sort by citation number and the "year-date" macro doesn't exist in the Nature style, so you either need to create it or use something like
    <key variable="issued"/> (though that will sort by the exact date (as provided in the metadata), so might not be what you want.
  • Thanks for the ideas. So a little more complicated it sounds like with the Nature style. Which style does have the year-date macro? Not going to have enough time to learn style editing at least at this point.
  • Most author date styles have a macro like this -- they don't all have the same name, but they're usually already part of the sort, so you'd just have to switch the order. So start from this list:
    https://www.zotero.org/styles?format=author-date&dependent=0

    To give you an example, the first style there is Academy of Management Review.
    It has as its sort macro
    <sort>
    <key macro="author"/>
    <key macro="issued-year"/>
    </sort>


    So the date macro is issued-year and you just switch the two to get what you need, so
    <sort>
    <key macro="issued-year"/>
    <key macro="author"/>
    </sort>

    Make sure to do this for the bibliography, not the citation section of the style
  • Thank you, that's very helpful!
Sign In or Register to comment.