1

I'm trying to create a bibliography with .bib file but it don't print in pdf.

My bib file has this structure:

 @book{latexcompanion,
    author        = {Michel Goossens and Frank Mittelbach and Alexander Samarin},
    title         = {The \LaTeX\ Companion},
    year          = {1993},
    publisher     = {Addison-Wesley},
    location      = {Reading, Massachusetts}
}

and my file has this aspect:

\documentclass[11pt]{report}
\usepackage[utf8]{inputenc}        
\usepackage{biblatex}
\addbibresource{report.bib}

    \begin{document}
        \chapter{Bibliografia}
        ola \cite{latexcompanion}
        \printbibliography

        \chapter{Anexos}

    \end{document}

What am I doing wrong? Cumps.

Heiko Oberdiek
  • 271,626
  • 1
    Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Adam Liter Jul 10 '14 at 03:06
  • 1
    Did you run pdflatex, biber, pdflatex? – cfr Jul 10 '14 at 03:13
  • Completing your code and taking out the gratuitous } results in code that compiles just fine for me. Like @cfr asked, are you running the correct compilation sequence? See Question mark instead of citation number – Adam Liter Jul 10 '14 at 03:14
  • thanks for your answers.. I have a lot of code, and I'm hiding some parts to be more legible. I've edited the post.. It still don't work. – arturataide Jul 10 '14 at 04:01
  • @cfr I get 3 error when I run bibtex.. – arturataide Jul 10 '14 at 04:10
  • Problem solved. I get an error when I'm compiling, but if I compile twice the problem is solved. Thank you all – arturataide Jul 10 '14 at 04:18
  • 1
    This question appears to be off-topic because the OP has reported that the problem has been solved by following the correct sequence of compilation. Furthermore, the issue was trivial, discussed extensively before, and hence does not merit further consideration. – Masroor Jul 10 '14 at 04:56
  • @Masroor Should I delete it? – arturataide Jul 10 '14 at 04:58
  • @arturataide Yes, you may wish to delete the question. Moreover, there are three close votes already, so it will get closed eventually. – Masroor Jul 10 '14 at 05:14

1 Answers1

-1

Just a suggestion. Using the same .bib file, it will be a lot easier if you will try this:

\documentclass[12pt,a4paper]{report}
\usepackage{cite}

\begin{document}

\chapter{Bibliografia}
ola \cite{latexcompanion}.

\chapter{Anexos}

\bibliography{report}{}
\bibliographystyle{plain}

\end{document}
  • I've tried your solution in my project, but it fails to compile.. – arturataide Jul 10 '14 at 04:03
  • Try to compile it at least twice. – olivarries Jul 10 '14 at 04:09
  • hank you very much.. If i compile twice it runs ok :) Thank you – arturataide Jul 10 '14 at 04:17
  • Why exactly is this a 'lot easier' than using biber? @arturataide I don't think this is good advice. biblatex and biber is a much more powerful combination. Unless you have to, those were good choices. The only thing you did wrong was to run bibtex rather than biber. That is, you needed pdflatex biber pdflatex. biber is a modern replacement for bibtex which definitely makes life easier. – cfr Jul 10 '14 at 21:11