I installed texlive-full and texstudio under Ubuntu and created a MyLibrary.bib file by exporting my zotero library. In my main.tex-file I have given the following instructions to include my library:


which I'd like to change to:

    \usepackage[authoryear, round]{natbib}

... but it just keeps giving me the old formatting for citations and the references-sextion. I don't know why I cant set the bibliographystyle to natdin or plainnat and why I can't use author-year-citations. A complete reinstall of texlive and texstudio didn't make a difference.

Here's MAIN.tex

    %\graphicspath{ {images/} }

And here's References.tex


If I activate the usepackage{natbib} command, I get this error-message:

    Package natbib Error: Bibliography not compatible with author-year citations ...mand\NAT@force@numbers{}\NAT@force@numbers

referring to this line in the MAIN.aux file


I also get a bunch of over- and underful \hbox error messages which I usually don't get.

  • Hi, and welcome on tex.stackexchange! Can you provide us with a minimum working example? – Alessandro Cuttin May 21 '15 at 13:29
  • Is that more helpful? – Nero4 May 21 '15 at 13:36
  • the error message indicates that the problem is in how the entries in the .bib file are constructed. please show a couple of those. (the "key" information required for author/year style is quite a bit more elaborate than for other styles, which require only a simple label.) – barbara beeton May 21 '15 at 14:16

When changing bibliography styles, it's usually a good idea to blow away the .aux file before recompiling with LaTeX, BibTeX, and LaTeX twice more. (This is especially true when switching from a style, such as plain, that generates numeric-style citation call-outs to another style that generates authoryear-style call-outs.) In your case, the messages you get from natbib after switching to natdin aren't so much error messages as they are warning messages. If you don't delete the aux files first, just hit "r" ("run") all three times when the warning messages are generated, and you'll end up with the correctly formatted entries in the references as well as the correct citation callout style.

Incidentally, the configuration file that goes with the natdin bibliography style file contains the instruction


This instruction tells natbib to use round parentheses (cf the first two arguments) as well as authoryear-style call-outs (the fourth argument) for the citations. Hence, it's actually not necessary to specify the options round and authoryear when loading natbib. Of course, it doesn't hurt to specify the options anyway. It's just that \bibpunct takes precedence over the options specified when natbib is loaded.

Here's the output of a program that uses the natdin style:

enter image description here

Just for comparison, here's the output of the same program when using the plainnat style -- natbib's re-implementation of the venerable plain style -- instead (note that plainnat, unlike plain, can generate authoryear-style citation call-outs):

enter image description here

\RequirePackage{filecontents}  % make this example self-contained
   author = "Anne Author",
   title  = "Thoughts",
   journal= "Circularity Today",
   year   = 5678,
   volume = 1,
   number = 2,
   pages  = "3-4",


  • Ok this took me another hour to figure out but it worked. You made my day! – Nero4 May 21 '15 at 17:08

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.