Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In my .tex document I have

[...]
\nocite{*}
\bibliographystyle{amsplain}
\bibliography{bibliografie}

\end{document}

And I have the bibliografie.bib file in the same folder. However, why the bibliography does not appear at the end of the document? And bibliografie.bib contains the following:

@BOOK{texbook,
   author = "Donald E. Knuth",
   title= "The {{\TeX}book}",
   publisher = "Addison-Wesley",
   year = 1984
   }

@BOOK{latexbook,
   author = "Leslie Lamport",
   title = "{\LaTeX \rm:} {A} Document Preparation System",
   publisher = "Addison-Wesley",
   year = 1986
   }
share|improve this question
    
It's not necessary to sign your questions (as there is already a box with your username below it) or to begin them with a greeting. –  Thorsten May 7 '11 at 9:24
    
maybe i'm missing something, but unless the system you're using is set up to run bibtex automatically, the absence of a .bbl file will mean that there is nothing for latex to read, and therefore no bibliography will ever appear in your document. –  barbara beeton May 7 '11 at 13:37
    
Are you (qwerty) processing your document through bibtex? You need to compile your file (let's call it test.tex) in the following way: pdflatex test, bibtex test, pdflatex test, and pdflatex test. –  Gonzalo Medina May 7 '11 at 19:53

3 Answers 3

The following minimal example works well.

\RequirePackage{filecontents}
\begin{filecontents*}{bibliografie.bib}
@BOOK{texbook,
   author = "Donald E. Knuth",
   title= "The {{\TeX}book}",
   publisher = "Addison-Wesley",
   year = 1984
   }

@BOOK{latexbook,
   author = "Leslie Lamport",
   title = "{\LaTeX \rm:} {A} Document Preparation System",
   publisher = "Addison-Wesley",
   year = 1986
   }

\end{filecontents*}
\documentclass[english]{amsbook}
\usepackage{babel}
\usepackage{blindtext}

\begin{document}
\tableofcontents
\Blinddocument
\nocite{*}
\bibliographystyle{amsplain}
\bibliography{bibliografie}
\end{document}

Please learn how to create a minimal example.

share|improve this answer
    
Marco, but that code where should be placed? all the code is in a .tex file, or..? –  qwerty May 7 '11 at 9:52
    
The part between \begin{filecontents*}{bibliografie.bib} and \end{filecontents*} will be written in a file called bibliografie.bib when you run the code Marco posted. The other part is a simple .tex file. –  Thorsten May 7 '11 at 9:55
    
@qwerty: the bib-file will create in the same folder. I can also split the code and after this I can use input or include. The result doesn't change. What problem do you have? –  Marco Daniel May 7 '11 at 9:56
    
And \RequirePackage{filecontents} where should be placed? –  qwerty May 7 '11 at 9:57
    
Ok, i've split the code, so in my .bib file i have The part between \begin{filecontents*}{bibliografie.bib} and \end{filecontents*} and the other in the .tex file, but the bibliography is still not shown.. –  qwerty May 7 '11 at 10:04

As far as I am aware, you have to include some other content (in this case an invisible \mbox).

\documentclass{article}
\begin{document}
\mbox{}
\nocite{*}
\bibliographystyle{amsplain}
\bibliography{bibliografie}
\end{document}
share|improve this answer
    
I don't think that this is true –  Thorsten May 7 '11 at 9:31
    
@Thorsten Maybe not, but it does not work without the \mbox so it is a quick solution. It says that biblio.bbl and biblio.aux are missing which is logical, because the first run on the biblio.tex file tries to compile an empty document. –  Harold Cavendish May 7 '11 at 9:38
    
@Harald: But where do you have a problem? The compilation of an empty document (first compilation) isn't an error. –  Marco Daniel May 7 '11 at 9:44
    
It just says No File ... .aux and No File ... .bbl which cannot be considered as an error. –  Thorsten May 7 '11 at 9:47
    
@Thorsten Yes, you are right. I have made a wrong assumption, sorry. Nevertheless, my solution works and I am eager to know what causes the problem. –  Harold Cavendish May 7 '11 at 10:01

In my case it was fault of editing tool. I was using TexMaker and it did not showed bibliography, because it was not enabled in build settings (preferences). Hope this helps somebody using TexMaker.

enter image description here

share|improve this answer
1  
Welcome to TeX.SX! –  Adam Liter Jul 28 at 15:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.