Zotero doesn't sort all pubs by full ascending date?

edited 8 days ago
Hi,

Apologies if this has been noted elsewhere, but I couldn't find anything online.

I have my library sorted by year, ascending, however within a year, I notice the publications sort descending.

I.e.: I expect this in my library

Publication, June 2000
Publication, January 2000
Publication, May 1999
Publication, January 1999

However what I am seeing is this:
Publication, January 2000
Publication, June 2000
Publication, January 1999
Publication, May 1999

Is there any way to sort on the full date?

Thanks!

Donna
  • Where exactly are you talking about sorting? In the Zotero library view or in a bibliography you generate in Word or elsewhere?

    For the Zotero library view, select the "Date" column from the upper right corner of the center pane, instead of the "Year" column.

    For bibliographies, this is controlled by the citation style. What style are you using?
  • Yeah, to be clear, it's not doing a descending sort — it's just not sorting beyond the year.
  • edited 8 days ago
    Thank you! Actually, for both the library view and a citation style. The "Date" column gave me what I needed.

    For my citation style, I am using a custom style, sorting using

    <macro name="issued">
    <date variable="issued">
    <date-part name="year"/>
    </date>
    </macro>


    And then
    <key macro="issued" sort="ascending"/>


    Is there another field I should be using?

    Thank you!
  • Sorry - just updated my comment above with the full macro text, and added the code tags.
  • Can you post your issued macro?
  • Hi! Yes, sorry, I updated my comment above with the macro.
  • But for simplicity, changing the macro="issued" there to variable="issued" should give you what you're after.
  • edited 8 days ago
    i.e., change the sort key you gave to:
    <key variable="issued" sort="ascending"/>

    If you also want the month to be printed as well, change your macro to:
    <macro name="issued">
    <date variable="issued">
    <date-part name="month" suffix=" "/>
    <date-part name="year"/>
    </date>
    </macro>
  • Yes, the macro is calling only the year. You can leave that as it is, since it's used for cite rendering. Changing the key to call the variable directly should work, with no side effects on the appearance of cites or bib entries.
  • @bwiernik Probably want to edit in some punctuation there.
  • Yes - that works perfectly. Thank you both so much!
Sign In or Register to comment.