4

I found this sample example im net. I created "references.bib" file in my template directory. I am getting the following output: Hallo world[einstein] with the warning: citation einstein on page 1 undefined

Do I miss something?

The contains of my references.bib is:

@artikel{einstein,
  author = {Albert Einstein},
  title = {the true about tree},
  journaltitle = {Annalen der Physik},
  year = {1905},
  volume = {322},
  number = {10},
  pages = {891-921}
} 


\documentclass{article}
\usepackage[backend=bibtex]{biblatex}
%\bibliography{references} 
%\addbibresource{<database>.<extension>}
\addbibresource{references.bib}
\begin{document}
Hallo world\cite{einstein}
\printbibliography
\end{document}

I appreciate any help.

5
  • Did you run LaTeX, BibTeX, LaTeX?
    – Joseph Wright
    Commented Jan 27, 2015 at 21:11
  • yes I tried it now and I am getting the same output!
    – ocean
    Commented Jan 27, 2015 at 21:17
  • 5
    Maybe @article?
    – Pier Paolo
    Commented Jan 27, 2015 at 21:18
  • 2
    I'm voting to close this question as off-topic because it was caused by a misspelling of the documentclass. Commented Jan 27, 2015 at 21:30
  • 1
    You mention that you placed the file references.bib in your "template directory" -- is it searched by BibTeX? Do you have more success if you place the file in the directory that contains the main tex file?
    – Mico
    Commented Jan 27, 2015 at 22:05

1 Answer 1

7

Change @artikel to @article:

\documentclass{article}
\usepackage[hyperref=true,
    natbib=true,
    style=authortitle-dw,
    backend=biber]{biblatex}

\begin{filecontents}{\jobname.bib}
    @article{einstein,
        author = {Albert Einstein},
        title = {the true about tree},
        journaltitle = {Annalen der Physik},
        year = {1905},
        volume = {322},
        number = {10},
        pages = {891--921}
    }
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
    Hallo world \\
    \cite{einstein}
    \printbibliography
\end{document}

MWE

6
  • What's with the triple backslash before cite?
    – Mico
    Commented Jan 27, 2015 at 22:01
  • I tired it. at the first it complained about the hyperref package, then I added it but afterwards I got these messages: Ciataion einstein on page 1 undefined. empty bibliography. And the pdf file was not created! I have even tried with one blackslash "\cite{einstein}" and I got the same result.
    – ocean
    Commented Jan 27, 2015 at 22:23
  • @Mico. The double backslash means: begin a new line.
    – Ludenticus
    Commented Jan 27, 2015 at 23:01
  • @ocean. I'm not sure what the problem is. Try to run it on sharelatex.com
    – Ludenticus
    Commented Jan 27, 2015 at 23:01
  • 3
    To create a paragraph break in ordinary text, just provide a blank line. Using \\ to force a line break should be reserved for specialized environments, such as array, tabular (and friends), and the various multi-line displaymath environments of the amsmath package.
    – Mico
    Commented Jan 28, 2015 at 5:53

Not the answer you're looking for? Browse other questions tagged .