[Tex/LaTex] Sort bibliography alphabetically with \citep command


I have a problem sorting bibliography alphabetically. Bibliography is listed in the order I cited the references. I have tried various ways to solve it but all I am achieving so far is breaking the whole thing.

I don't mind switching packages as long as I get to keep these two things: I am using \citep command throughout as my supervisor wants me to have references like

(Smith et.al, 2012).

So I want to keep using \citep command. Second, I need bibliography in alphabetical order. I would be very grateful for suggestions.

Here is relevant lines I have:


Best Answer

Natbib does not "do all the work": it depends on loading an appropriate bibliography style. It is the style (not natbib) which is responsible (with bibtex) for the detailed format of entries in the bibliography, and for sorting the bibliography. Natbib is not "tied" to any particular bibliography style, though it does "come with" some basic styles with which it is compatible. But there are other styles available, depending on your detailed needs.

For your purposes it looks to me (as it does to egreg and others) that the style you want is plainnat. Far from being incompatible with natbib it was intended for it, as the name suggests. which will produce an alphabetically sorted bibliography. The reason you are seeing the (undesired) sorting behaviour is that you are using a style which is intended to produce references in order of citation.

So try changing your file to \bibliographystyle{plainnat}. Delete your .aux, .blg, and .bbl files, and re-run LaTeX -> bibtex -> LaTeX -> LaTeX. This should produce a bibliography ordered as you want it to be. If you are getting errors in this, it's certainly not for any incompatibility with natbib; but tell us what problems you are seeing, and we can try to help.

Related Question