Custom reference style help #2

Hi again, we are having issues with citing multiple unique references from the same author and same year. For example, we'd like to cite 3 references (Smith 2020) so that they display as (Smith 2020a); (Smith 2020b); and (Smith 2020c). We'd like the order of the a,b,c to match the order that they are cited within the Word document and for that order to be the order used within the bibliography. Additionally, if we add a fourth unique citation from (Smith 2020) in the document ahead of the other three citations, we'd like Zotero to automatically assign that citation with "a" and bump the other three citations down to b,c,d. Currently, this is not functioning as described. Are you able to assist with this?

Style code here: https://www.toptal.com/developers/hastebin/exusurokaf.xml
  • edited December 16, 2021
    I think simply key variable="citation-number" (with the right brackets, obviously) as line 101 should do this
  • I tried applying that fix same to my style. What you suggested works most of the time but I have found an edge case where it doesn't. As I add citations to the document they are lettered in the order in which they appear in the document and if I add a new citation at the start of the document it shows up as Smith 2021a and all the subsequent ones are re-lettered (the old (Smith 2021a) becomes (Smith 2021b), etc.), which is what I would like. However if I have some citations in a document and I add a citation to the same source at the start it doesn't work right.

    For instance say I have a source which has been given the citation (Smith 2021b) partway through the document and I add new citation to that source in front of all the other citations. I would expect that citation to update to (Smith 2021a) and for all the subsequent citations to update accordingly as it is now the first citation in the document. However the citation stays as (Smith 2021b).

    Is this a limitation of the method you suggested, or is it more likely that there is something wrong with my style which is messing it up?
  • That just sounds like it's not updating properly. Try switching to a different style and back
  • That worked perfectly, thank you.
Sign In or Register to comment.