Changes to APA 7th Ed

I need some assistance in making changes to APA 7th edition. I would greatly appreciate if anyone could assist me (feel free to make changes to the published version in Zotero if possible). In particular, I need to make four changes.

1) I need to modify the style to disambiguate references and, accordingly, citations by adding "a", "b", "c", etc to the source's year field.

Obviously, the style already does that by default when a source has *exactly* the same author(s) and year. However, I also want the style to do it in, for example, the following situation:

Johns, A., Bat, B., & Sam, S. (2010). Title. Etc.
Johns, A., Roberts, C., & Smith, A. (2010). Another title. etc.

Because APA 7th edition cites both sources as "(Johns et al., 2010)", the reader does not know which one it refers to. Is it possible to make the in-text citation for these sources read: "(Johns et al., 2010a, 2010b)" or "(Johns et al., 2010a; Johns et al., 2010b)". Either style works—whatever is easier to implement.

If it's not possible, then I guess I'll have to do it manually. It would not be an ideal situation, however, since I'll be dealing with hundreds if not thousands of references.

2) I would also like to remove any code that disambiguates sources with initials. I found another post on the forum that says to remove:

givenname-disambiguation-rule="primary-name" and disambiguate-add-givenname="true"

Would that result in the change I require for citations at least?

Basically, the *only* form of disambiguation I want is the "a", "b" etc to sources' year field.

3) I need to add "In " (note the space) before conference papers. For example:

Adams, S. (2019). I'm a paper title. In Proceedings of the Happy Conference.

Currently, I figured out that I could add "In " in the visual editor, but it applies it to everything (journal papers etc.). I want it to apply only to papers in proceedings.

4) I need to add "Retrieved from " to all links that Zotero includes. Again, I made this change in the visual editor as a prefix and it seemed to work fine. Since I will always want URLs to have "Retrieved from " (note the space) before them, it doesn't seem to be an issue as above for "In ".

If anyone could make these changes to the style and share it or, alternatively, let me know what I need to do, I would greatly appreciate it.

Thank you!
  • edited April 24, 2023
    1+2) Remove disambiguate-add-names="true" disambiguate-add-givenname="true" givenname-disambiguation-rule="primary-name-with-initials" from line 1864.

    4) Change the access macro to:
    <macro name="access">
    <choose>
    <if variable="DOI" match="any">
    <text variable="DOI" prefix="https://doi.org/"/>
    </if>
    <else-if variable="URL">
    <group delimiter=" ">
    <group delimiter=" ">
    <text term="retrieved" text-case="capitalize-first"/>
    <date variable="accessed" form="text" suffix=","/>
    <text term="from"/>
    </group>
    <text variable="URL"/>
    </group>
    </else-if>
    </choose>
    </macro>


  • Thanks for your help, damnation.
  • edited May 17, 2023
    Hi, everyone

    The fix for my original first and second issue worked wonderfully.

    It seems the code for the access macro didn't work. I tried several times and the style editor says the code isn't valid.

    Could anyone help?

    Again, specifically, I require:

    DOIs to have a "Retrieved from " before them. Also, I would like to modify the style so that it DOES NOT include the URL in the "URL" info tab when present. I only want the APA 7th ed style to export DOIs.

    Help appreciated! (Ps. I know APA 7th edition doesn't include "Retrieved from" anymore, but I need it.)

    Also still hoping someone knows how I can address my original point 3 above.

    Thanks in advance if anyone can help.
  • edited May 30, 2023
    Again, specifically, I require:

    DOIs to have a "Retrieved from " before them. Also, I would like to modify the style so that it DOES NOT include the URL in the "URL" info tab when present. I only want the APA 7th ed style to export DOIs.
    Not sure why that's "Again" -- that's not what you asked for above (generally better to include specific examples). For this, change the access macro to


    <macro name="access">
    <group delimiter=" ">
    <text term="retrieved" text-case="capitalize-first"/>
    <text term="from"/>
    <text variable="DOI" prefix="https://doi.org/"/>
    </group>
    </macro>

  • Thanks. I'll give that a go.
  • Hi, there.

    Unfortunately, using that code gives me the 'not valid XML' error.

    Still hoping someone can help.

    Thanks.
  • The forum software just messes with it. Remove the semicolon after on the DOI line.
  • Yeah I thought to do that. No change, unfortunately.
  • I mean, it's valid XML without that, so if you're getting that error, you've introduced some other error. Use an XML validator.
  • I'm using a style that works and changing nothing else except the added code. I can try a validator I guess.
  • I just ran it and it says it's validated. Yet I still receive an error when attempting to add it to Zotero?
  • Can you post a link to the style? E.g., on https://gist.github.com/
  • Interesting. I installed the style anyway and tested it and it seems to work. I don't know why I'm getting an error.
  • You might get an error if you have a superfluous macro as well.
    And generally, the styles oftentime work anyway.
    But share your code if you want. :)
  • It's ok. It came up with 'the CSL may have a potential error' when importing it but I validated it beforehand and it works fine after exporting references and using it. So I think I'm good. Thank you everyone!
Sign In or Register to comment.