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},
}
\bibliographystyle{acm}
with something that is natbib compatible. Btw: You are using xelatex or lualatex, so dont't load\usepackage[utf8]{inputenc}
.numbers
?abbrvnat
, it works fine. It is an author year style.