APA: sort in-text citations by date; short author list first time

Hello, can you please help me customize the APA 7th citation styles in two ways:

(1) Sort by date. Is this the code to edit? if so, how? (lines 1863-1869.








(2) Strict APA style has a complete author list the first time a citation is used, and then switches to et al. The journal to which I'm submitting uses et al. from the beginning How do I enact this change in the code?

Thanks.
  • (1) note that the Zotero style does follow the manual guidelines for sorting citations and bibliography entries. If this is for a CV, check out the APA Curriculum vitae style in the repository.

    If you want to post your code, you need to wrap it in <code> <:code> tags.

    (2) No. this was changed in APA 7th edition. APA now uses et al from the first citation.
  • (1) I understand that is a deviation from APA. It is still the format that this journal uses.


    <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="false" collapse="year" givenname-disambiguation-rule="primary-name">
    <sort>
    <key macro="author-bib" names-min="3" names-use-first="1"/>
    <key macro="date-sort-group"/>
    <key macro="date-sort-date" sort="ascending"/>
    <key variable="status"/>
    </sort>


    (2) I see. thx.
  • Yes, that's the bit. Just moving the author-bib line behind the status line should be all that's needed.
  • Hmm. still not working. I've closed out and rebooted. I tried switching to Ecology and Society, and that does change the order of citations, but I want the bib to be APA. Here's the code now:


    <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="false" collapse="year" givenname-disambiguation-rule="primary-name">
    <sort>
    <key macro="date-sort-group"/>
    <key macro="date-sort-date" sort="ascending"/>
    <key variable="status"/>
    <key macro="author-bib" names-min="3" names-use-first="1"/>
    </sort>
  • That should just work. Have you changed stylename and ID?
  • edited March 26, 2021
    Is stylename title? Then yes.
    Here is the line for ID:

    <id>http://www.zotero.org/styles/apa</id>;

    How should that change?
  • it just needs to be anything that's not on the style repository -- doesn't need to be an valid URL, so http://www.zotero.org/styles/apa-beccaprice would be fine
  • Still no go. I am changing the version in the title and ID each try. Now I have:

    <title>Becca APA for LSE v05</title>
    <title-short>BP's APA 05</title-short>
    <id>http://www.zotero.org/styles/apa-beccaprice05</id>;


    and


    <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="false" collapse="year" givenname-disambiguation-rule="primary-name">
    <sort>
    <key macro="date-sort-group"/>
    <key macro="date-sort-date" sort="ascending"/>
    <key variable="status"/>
    <key macro="author-bib" names-min="3" names-use-first="1"/>
    </sort>

  • edited March 26, 2021
    Can you please post your full edited style to pastebin.com or gist.GitHub.com, post a link here, and let us take a look?
  • That style has author last in the citation sorting, but not the bibliography. Are you looking at sorting in the citation or bibliography? If you want bibliography, change the sorting there too.
  • I am only looking to change the sort order of the in-text citations by date. The bibliography should be alphabetized by author.
  • alright. I just got it! I need to move the data-sort-group line down, too:

    <citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="false" collapse="year" givenname-disambiguation-rule="primary-name">
    <sort>
    <key macro="date-sort-date" sort="ascending"/>
    <key variable="status"/>
    <key macro="author-bib" names-min="3" names-use-first="1"/>
    <key macro="date-sort-group"/>
    </sort>

  • Your last comment helped me realize that each of those lines was related to a different sort command. That helped me troubleshoot. Thank you both.
  • Hmm -- the date sort group should only matter if items don't have a regular date, though, so that's still a bit weird, but as long as it's working for you.
Sign In or Register to comment.