2

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:

...
\usepackage[round]{natbib}
...
\begin{document}
...
\bibliographystyle{apsrev}
\bibliography{bibliography}
...
\end{document}
5
  • 2
    The apsrev style uses "unsorted order". Use \bibliographystyle{plainnat}, for instance.
    – egreg
    Oct 23, 2012 at 11:45
  • I don't know much about natbib or \citep, but without it, the way to go would be to change the \bibliographystyle for something like plain, for example. Does it conflict with natbib and/or \citep?
    – T. Verron
    Oct 23, 2012 at 11:46
  • thanks, this is actually the first thing I tried but compilation fails when I try this style.
    – Aina
    Oct 23, 2012 at 11:46
  • I think using plainnat or plain conflicts with natbib and I don't have enough experience to understand how to fix it.
    – Aina
    Oct 23, 2012 at 11:48
  • It's quite improbable that plainnat conflicts with natbib, being part of the package.
    – egreg
    Oct 23, 2012 at 12:06

1 Answer 1

2

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.

7
  • Thank you for you time, I have followed your instructions to get an error during LaTeX run (after bibtex): ! Undefined control sequence. l.46 \bibc
    – Aina
    Oct 23, 2012 at 12:19
  • What error did you get? Oct 23, 2012 at 12:19
  • This error probably tells nothing to you. I found now that I managed to run a small part of my thesis with plainnat. But when I add another chapter, it breaks. Though with absrev it never complains.
    – Aina
    Oct 23, 2012 at 12:26
  • There's a lot of guessing here; but it looks to me as if an undefined control sequence is probably slipping in via an input file. Are you using \include? Have you tried making sure that ALL "old" .aux files are deleted and that you have fully recompiled all included chapters with the new settings? Oct 23, 2012 at 12:41
  • Yes, I am using \include, and you are right I did need to make sure I delete all files, hence I am running it in a different directory and clearing it every time I get an error. Right now I am essentially going paragraph by paragraph rerunning the main file and un-commenting more and more (it'll take a while...).
    – Aina
    Oct 23, 2012 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.