In this example I used \parencite{key}
to put some parenthesis around the in text citation.
mythesis.tex
\documentclass[bibtotocnumbered]{article}
\usepackage[utf8]{inputenc}
\usepackage[style=authoryear,backend=biber]{biblatex}
\addbibresource{library.bib}
\begin{document}
\tableofcontents
\newpage
Some text to cite here \parencite[23]{Lin1973}.
Another text to cite here \parencite[123]{Goedel1930}.
\printbibliography[heading=bibintoc]
\end{document}
library.bib
% This file was created with JabRef 2.9.2.
% Encoding: UTF8
@BOOK{Goedel1930,
title = {Die Vollständigkeit der Axiome des logischen Funktionenkalküls},
publisher = {Monatshefte für Mathematik und Physik},
year = {1930},
author = {Kurt Gödel},
address = {Wien}
}
@ARTICLE{Lin1973,
author = {Shen Lin and Brian W. Kernighan},
title = {An Effective Heuristic Algorithm for the Travelling-Salesman Problem},
journal = {Operations Research},
year = {1973},
volume = {21},
pages = {498--516}
}
My Workflow:
pdflatex mythesis
biber mythesis
pdflatex mythesis
pdflatex mythesis
To edit your .bib file I would recommend you a reference manager like JabRef.
Make sure your files are encoded in UTF8.
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:
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.
Best Answer
Solution in Brief
The
\hfil
in the arguments of\item
s which actually render the bibitems is responsible for the horizontal white spaces.Rendering of bibitems is done by the
\@lbibitem
command. So, we need to redefine it. One way for this will be to use\renewcommand
. But definitely, a smarter way will be to use\patchcmd
.The Full Code
The Output
The Sleuthing Activity
An inspection of the .bbl file shows that each bibliographic entry is rendered by a
\bibitem
.So, we issue a
\show\bibitem
inside our source. This gives:\bibitem=\long macro: ->\@ifnextchar [{\@lbibitem }{\@lbibitem []}.
We delve deeper and look inside
\@lbibitem
.gives:
Which, I must say, is a mouthful and somewhat difficult to perceive. So, we open the
natbib.sty
file in an editor and search for\@lbibitem
.The subsequent lines show how the bibliographic entry is being rendered. The line,
raises our suspicion and tweaking with this confirms that we have hit the right point.
Further Reading
If you want to know more about
\patchcmd
, please take a look at this wonderful answer.