[Tex/LaTex] how to add references (basic)

#refbiblatexciting

This may seem an easy problem to you but for me I am struggling with it!.I need a little help with adding references in my report. I am able to compile and get a pdf doc but my problem is how to cite. I used \cite{ref1} but it does connect with the .bib file. I am getting [ref1] instead of [1].

\documentclass[a4paper]{report}
 \usepackage{graphicx}
 \usepackage[latin1]{inputenc}
 \usepackage[T1]{fontenc}
 \usepackage[english]{babel}
 %\usepackage[style=authortitle-icomp]{biblatex}
 \usepackage{lmodern}
 \usepackage[backend=biber,bibencoding=latinl]{biblatex}
 %\addbibresource{folder/references.bib}
 \begin{document}
my report here
\printbibliography
\end{document}

% Here is the references.bib file in which I have the citation
%both the main file and bib file are saved in the same folder

@book{ref1,
isbn = {3-662-45239-1},
title = {Scanning Probe Microscopy},
language = {eng},
author = {Voigtländer, Bert},
publisher = {Springer Berlin Heidelberg},
}

Best Answer

Your are close, but there are two errors

  1. you need a line \addbibresource{references.bib} so biblatex finds the bib file

  2. latinl is not a valid encoding, it should be latin1 (or switch to the default utf8)

Here is a minimal document

Sample text

Sample bib

\documentclass[a4paper]{report}

\usepackage[backend=biber,bibencoding=latin1]{biblatex}
\addbibresource{references.bib}

\begin{document}

My report here \cite{ref1}.

\printbibliography

\end{document}

with references.bib

@book{ref1,
  isbn =     {3-662-45239-1},
  title =    {Scanning Probe Microscopy},
  language =     {eng},
  author =   {Voigtländer, Bert},
  publisher =    {Springer Berlin Heidelberg},
}