[Solved] Change Order of Same-Author Same-Year Citations

James Skinner Asks: Change Order of Same-Author Same-Year Citations
Sometimes I cite papers or books that were published in the same year by the same author. The default option is to sort them alphabetically by title. So if item 1’s title begins with an ‘A’ and item 2’s title begins with a ‘Z’, and both were published in 2012 by Kagan, then item 1 will be (Kagan 2012a) and item 2 will be (Kagan 2012b). But that looks weird if I cite item 2 first. How can these items be sorted according to the order in which I cite them as opposed to alphabetically by title? I’d still like the order of all other items to be done alphabetically by the author’s last name, and then the year of publication. Thanks!

Here’s a MWE:

Code:
documentclass[12pt]{article}

usepackage{enumitem} %adjusts lists
usepackage{baskervillef} %font
usepackage[T1]{fontenc} %font
usepackage[margin=25mm]{geometry} %changes margins
usepackage{filecontents}

begin{filecontents}{jobname.bib}
@book{Kagan2012a,
    address = {New Haven, CT},
    author = {Kagan, Shelly},
    file = {:Users/James/Library/Application Support/Mendeley Desktop/Downloaded/Kagan - 2012 - Death.pdf:pdf},
    publisher = {Yale University Press},
    title = {{Death}},
    year = {2012}
}

@book{Kagan2012,
    address = {Oxford},
    author = {Kagan, Shelly},
    file = {:Users/James/Library/Application Support/Mendeley Desktop/Downloaded/Kagan - 2012 - The Geometry of Desert.pdf:pdf},
    publisher = {Oxford University Press},
    title = {{The Geometry of Desert}},
    year = {2012}
}
end{filecontents}




%%%%%%%%%%BIBLIOGRAPHY

usepackage[style=apa6, doi=false, url=false, isbn=false, date=year, natbib=true]{biblatex}
setlengthbibitemsep{1.5itemsep}
AtEveryBibitem{clearfield{chapter}} %gets rid of chapters
DeclareFieldFormat{apacase}{#1} %stops capitalisation
AtEveryBibitem{clearfield{number}} %clears issue numbers
DeclareFieldFormat[article]{volume}{apanum{#1}} %de-italicises volume numbers
renewcommand*{finalnamedelim}{%
    ifnumgreater{value{liststop}}{2}{finalandcomma}{}%
    addspace&space} %replaces 'and' with '&' in in-text citations.

addbibresource{jobname.bib}

%%%%%%%%%%%%%%%%%%%%


%%%commands to stop hyphenation in bibliography
renewcommand*{bibsetup}{%
    interlinepenalty=5000relax
    widowpenalty=10000relax
    clubpenalty=10000relax
    % no hyphenation in the bibliography
    hyphenpenalty=10000exhyphenpenalty=10000relax
    % increase allowed stretch to avoid overfull boxes
    setlength{emergencystretch}{1em}%
    raggedbottom
    frenchspacing
    biburlsetup}
%%%



title{Change the Ordering of Same-Author Same-Year Citations}


begin{document}

maketitle

In 2012, Shelly Kagan wrote two books. Suppose that I cite his book on what people deserve first, citet{Kagan2012}, and then his book on death, citet{Kagan2012a}. Since I've cited his book on desert first I would like that one to be (2012a) rather than (2012b). That is, I would like the `a' and `b' to be ordered according to the order in which they are cited as opposed to by the alphabetical order of the titles.

printbibliography


end{document}

Which outputs:


enter image description here

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.