[Tex/LaTex] Problem with bibliography (BibTex) natbib package and Bib Style

bibliographiesbibtexnatbibtexstudio

For my thesis I'm working with TeXStudio and I tried to include my bibliography in my document. I used BibTeX for my bibliography and saved it in a .bib file, but I can't seem to make it work properly. When I use \usepackage{natbib}, I get an error message saying

! Package natbib Error: Bibliography not compatible with author-year
citations.

And whatever style I use, it keeps the plain style…
Someone knows what I did wrong?

Here my code:

\documentclass[10pt,a4paper,final]{book}
%\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage[hidelinks]{hyperref}
\usepackage{natbib}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\usepackage{polyglossia}
\setmainlanguage{french}
\setotherlanguages{english,german,latin,italian,spanish,russian,greek}

\begin{document}
text
\section{Bibliographie}
\bibliographystyle{acm}
\bibliography{roumain}
\end{document}

Example of my bibliography:

@mvbook{SMFC,
    author = {SMFC = Academia RPR, Institutul de lingvistica din Bucuresti},
    title = {Institutul de lingvistica din Bucuresti, Studii \c{s}i materiale privitoare la formarea cuvintelor în limba român\u{a}},
    date = {vol I, 1959 ; II, 1960 ; III, 1962 ; IV, 1967 ; V, 1969 ; VI, 1972},
    editor = {Editura Academiei},
    volumes = {6},
    location = {Bucarest},
}
@inbook{Asan-PsaltHur,
    author = {Asan, Finuţa},
    title = {Derivarea cu sufixe şi prefixe în Psaltirea Hurmuzaki},
    booktitle = {SMFC},
    date = {1959},
    bookauthor = {Academia RPR, Institutul de lingvistica din Bucuresti},   editor = {Editura Academiei},
    location = {Bucarest},
    volume = {1},
    volumes = {6},
    pages = {203-212}
}     
@book{Popescu-Formarea,
    author = {Popescu Marin, Magdalena (coord.)},
    title = {Formarea cuvintelor în limba română din secolele al XVI lea – al XVIII lea},
    date = {2007},
    editor = {Editura Academiei},
    location = {Bucarest},
}

enter image description here

Best Answer

Well, in your code I can see some problems.

For example should package hyperref be the last called package!
The documentation of package natbib can you read by typing texdoc natbib on your console/terminal. There are the styles listed you can use with natbib and which styles and field names are supported.

To give you a starting point I changed your MWE, deleted not needed package calls for this problem, changed the order of package calls and added the missing informations for field year and publisher to your bib file (btw package filecontents is only used to have bib file and TeX code in one compilable MWE).

MWE:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{SMFC,
  author    = {{SMFC = Academia RPR, Institutul de lingvistica din Bucuresti}},
  title     = {Institutul de lingvistica din Bucuresti, Studii \c{s}i 
               materiale privitoare la formarea cuvintelor în limba român\u{a}},
  note      = {vol I, 1959 ; II, 1960 ; III, 1962 ; IV, 1967 ; V, 1969 ; VI, 1972},
  year      = {1972},
  editor    = {Editura Academiei},
  publisher = {UNKNOWN},
  volumes   = {6},
  location  = {Bucarest},
}
@inbook{Asan-PsaltHur,
  author     = {Asan, Finuţa},
  title      = {Derivarea cu sufixe şi prefixe în Psaltirea Hurmuzaki},
  booktitle  = {SMFC},
  year       = {1959},
  bookauthor = {Academia RPR, Institutul de lingvistica din Bucuresti}, 
  editor     = {Editura Academiei},
  publisher  = {UNKNOWN},
  location   = {Bucarest},
  volume     = {1},
  volumes    = {6},
  pages      = {203--212},
}
@book{Popescu-Formarea,
  author    = {Popescu Marin, Magdalena (coord.)},
  title     = {Formarea cuvintelor în limba română din secolele al XVI lea – al XVIII lea},
  year      = {2007},
  editor    = {Editura Academiei},
  publisher = {UNKNOWN},
  location  = {Bucarest},
}
\end{filecontents*}


\documentclass[10pt,a4paper,final]{book}
\usepackage{fontspec} % utf-8 encoding!
\setmainfont{Times New Roman}

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\usepackage{polyglossia}
\setmainlanguage{french}
\setotherlanguages{english,german,latin,italian,spanish,russian,greek}

\usepackage[numbers]{natbib}
\usepackage[hidelinks]{hyperref}


\begin{document}
text \cite{Asan-PsaltHur} \nocite{*}
\section{Bibliographie}
\bibliographystyle{abbrvnat} % plainnat abbrvnat
\bibliography{\jobname}
\end{document}

Now if you compile you will get three warnings like this:

three resulting warnings

As you can see the warning is pretty clear (same with the warnings you got with your original code): you can not use author and editor both. Please rework your bib file. I also changed your undefined @mvbook to @book.

At last three tips:

  • SMFC = Academia RPR, Institutul de lingvistica din Bucuresti is an unusual entry for an author, better would be to place the acronym in the text and use the complete name. But your given name for author is an institution, as I can see. So better use it as editor ...
  • Studii \c{s}i should be in an utf-8 encoded file changed. Please change all tex substitutions for special characters with cedilie etc. to the corresponding original utf-8 letter.
  • You need a field year to be style-conform, so in the case of your first entry SMFC I would use field note={vol I, 1959 ; II, 1960 ; III, 1962 ; IV, 1967 ; V, 1969 ; VI, 1972}, instead your date field.