I am relatively new to latex and I am puzzled by the way citations work. I used Mendeley to generate a bib-file with all my references in it but I am having trouble using citations in my text.
What I do is this:
\documentclass{article}
\usepackage[utf8]{inputenc}
\bibliography{C:/Users/PC/Documents/biblio}
\begin{document}
\maketitle
Please insert a citation here \cite{Ross2010}
\end{document}
I use MikTex and typeset with pdfLaTex+MakeIndex+BibTex and I used Mendeley to create a large .bib file with all my references in for me to reference in the beginning of the document but when I check, it doesn't recognize any of the references in the list and just write "?" in the pdf.
What am I missing?
Best Answer
A corrected example would be the following:
Where you need to replace and by the corresponding values. Please note the following changes I made:
\bibliography
has to be inside your document (not in the preamble) where you want your list of references to appear. Additionally, you need a\bibliographystyle
command to tell the compiler what style your bibliography should have. There are severaly styles available from which you can choose. (For more styles there are also packages likenatbib
which might come in handy).Customizing a
bibtex
style is also possible, but I personally would recommend to usebiblatex
instead, as it is easier to customie and more flexible. A MWE forbiblatex
would look like the following:This example must be compiled using latex, biber, latex, latex.
For a more in depth explanation, please have a look at thie excellent answer: https://tex.stackexchange.com/a/25702/134144