# How to force a certain sorting of two .bib entries?

So there are two articles I'm citing in a paper, here are their BibTeX entries:

@incollection{ShapiroSI,
Author = {Stewart Shapiro},
Booktitle = {Identity and Modality},
Date-Modified = {2014-01-21 01:27:50 +0000},
Pages = {109 -- 145},
Publisher = {Oxford University Press},
Title = {Structure and Identity},
Year = {2006}}

@incollection{ShapiroGI,
Author = {Stewart Shapiro},
Booktitle = {Identity and Modality},
Date-Modified = {2014-01-21 04:24:54 +0000},
Pages = {164 -- 173},
Publisher = {Oxford University Press},
Title = {The Governance of Identity},
Year = {2006}}


Now, the article titled "Structure and Identity" is actually first chronologically, and the article "Governance and Identity" is a response to an article criticizing "Structure and Identity". Given that, I want "Structure and Identity" to be listed as Shapiro 2006a (i.e., be sorted before "Governance and Identity") even though it comes after "Governance and Identity" alphabetically.

How can I accomplish this without adding extra information to the reference that gets printed (I don't want to, for instance, specify a month of publication; it's obviously fine to add more information to the .bib entry so long as this information isn't printed in my references section)?

EDIT: Here is a complete MWE, (you can find phil_review.bst here)

\begin{filecontents}{test.bib}

@incollection{ShapiroSI,
Author = {Stewart Shapiro},
Booktitle = {Identity and Modality},
Date-Modified = {2014-01-21 01:27:50 +0000},
Pages = {109 -- 145},
Publisher = {Oxford University Press},
Title = {Structure and Identity},
Year = {2006}}

@incollection{ShapiroGI,
Author = {Stewart Shapiro},
Booktitle = {Identity and Modality},
Date-Modified = {2014-01-21 04:24:54 +0000},
Pages = {164 -- 173},
Publisher = {Oxford University Press},
Title = {The Governance of Identity},
Year = {2006}}

\end{filecontents}

\documentclass{article}
\usepackage{natbib}
\setcitestyle{aysep={}}
\bibpunct{(}{)}{,}{a}{}{,}

\begin{document}

Some text \citep{ShapiroSI} and another citation \citep{ShapiroGI}

\bibliographystyle{phil_review}
\bibliography{test}
\end{document}

• This would be very easy using biblatex. – Gonzalo Medina Feb 13 '14 at 3:43
• @GonzaloMedina I don't doubt that but, unfortunately, I have to use BibTeX for various bureaucratic reasons. – Dennis Feb 13 '14 at 4:15
• What style are you using? The .bst sets the rules, so it's helpful if you provide a complete minimal example. (And don't forget that, as a last resort, you can fiddle with the .bbl right before your submission to the Powers That Be and put things in any order you want.) – jon Feb 13 '14 at 4:39
• @jon Ah good call, my knowledge of how BibTeX and the .bst's work is minimal at best, so I didn't realize to include the .bst. Will edit the question now to include that information. – Dennis Feb 13 '14 at 4:40

The old BibTeX trick works here. We use

\newcommand{\noop}[1]{}


to define a command that doesn't actually print anything. Then we put it in the titles of the two .bib entries because they are the point at which we want to disambiguate. Nothing gets printed, but BibTeX will now sort theses entries in an order you can force. Here's a complete example, slightly changed from yours.

\RequirePackage{filecontents}% <-- allows the filecontents to be re-written each run.
\begin{filecontents*}{test.bib}

@incollection{ShapiroSI,
Author = {Stewart Shapiro},
Booktitle = {Identity and Modality},
Date-Modified = {2014-01-21 01:27:50 +0000},
Pages = {109 -- 145},
Publisher = {Oxford University Press},
Title = {\noop{aaa}Structure and Identity},
Year = {2006}}

@incollection{ShapiroGI,
Author = {Stewart Shapiro},
Booktitle = {Identity and Modality},
Date-Modified = {2014-01-21 04:24:54 +0000},
Pages = {164 -- 173},
Publisher = {Oxford University Press},
Title = {\noop{zzz}The Governance of Identity},
Year = {2006}}

\end{filecontents*}

\documentclass{article}
\usepackage{natbib}
\setcitestyle{aysep={}}     % <-- note this is set twice; here
\bibpunct{(}{)}{,}{a}{}{,}  %     and in this line.

\begin{document}

Some text \citep{ShapiroSI} and another citation \citep{ShapiroGI}

\bibliographystyle{phil_review}
\bibliography{test}
\end{document}


Note, if you prefer to keep the \noop ready to go because you may want to use it for multpile documents, the @preamble command for BibTeX is your friend. You could add this to your .bib file:

@preamble{ "\providecommand{\noop}[1]{}" }

• @NicholasHamilton -- Isn't it though? (Wish I could say I first thought of it...) – jon Feb 13 '14 at 14:45
• Really very cool. – Dennis Feb 13 '14 at 15:54
• @Dennis -- Cheers! – jon Feb 13 '14 at 16:47
• Nice addition of the @preamble command, didn't know about that either! – Dennis Feb 13 '14 at 17:06