7

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
   }
Thorsten
  • 12,872
qwerty
  • 2,975
  • 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 07 '11 at 09: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 07 '11 at 13:37
  • 1
    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 07 '11 at 19:53
  • Note : You have to build the bibliography too, by clicking on F11 (or go to >Tools>BibTex). If you still have the same problem, try that. Good luck ! – SMAIL LOUNES Dec 21 '18 at 19:55
  • simply put the lines \begin{thebibliography}{..} ..... \end{thebibliography} into a tex file, say biblio.tex and just \include it after \backmatter in main.tex. Problem solved. It is adhoc but does the job! Neither solution in any forum actually worked for me but this one did. – Karthik C Mar 29 '19 at 02:16

5 Answers5

22

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

2

I had the exact same problem as you, and was already doing what the other answers suggest doing.

I'm using TexMaker, and found that the problem was the option 'Use a "build" subdirectory for output files', found in the tab 'Commands' in the "Configure TexMaker" dialog window. When checked, all the citations appear as question marks, and the bibliography doesn't show. After I unchecked it, citations started working and the bibliography appeared.

Option that must be unchecked

  • Welcome to TeX.SX! Are you sure that this will solve the OP? I think the other supposted answers should solved the problem correctly. – Bobyandbob Jul 28 '17 at 16:18
  • Thank you.

    Well, I posted this because the other options didn't solve my problem, and I learned this was a solution to my problem.

    If someone were to have the same problem as I did, their question would be the same as OP's, so I thought it would be pertinent to also have this answer here.

    – Sirplentifus Jul 29 '17 at 14:25
1

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.

Marco Daniel
  • 95,681
  • Marco, but that code where should be placed? all the code is in a .tex file, or..? – qwerty May 07 '11 at 09: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 07 '11 at 09: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 07 '11 at 09:56
  • And \RequirePackage{filecontents} where should be placed? – qwerty May 07 '11 at 09: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 07 '11 at 10:04
  • Do you compile the main file by bibtex? I repeat my information that we need a working example that shows the problem. – Marco Daniel May 07 '11 at 10:07
  • Ok, so i have the file bibliografie.bib and in TexnicCenter under the "Build" menu i have the BibTex menu item, which compiles the .bib file, but this menu item is disabled.. Why? – qwerty May 07 '11 at 10:15
  • @qwerty: I have no Windows. Try the following. Open the aux-file with TeXnicCenter and maybe the menue item is enabled. – Marco Daniel May 07 '11 at 10:24
1

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}
  • 1
    I don't think that this is true – Thorsten May 07 '11 at 09: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 07 '11 at 09:38
  • @Harald: But where do you have a problem? The compilation of an empty document (first compilation) isn't an error. – Marco Daniel May 07 '11 at 09:44
  • It just says No File ... .aux and No File ... .bbl which cannot be considered as an error. – Thorsten May 07 '11 at 09: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 07 '11 at 10:01
0

In case you are first stumbling upon this search result, looking for an answer on this question while not matching the code in the original post, the could be that your \bibliographystyle{...} is commented out, is missing or has an illegal argument. There should be exactly one \bibliographystyle{} in your document.

When I was working in a well-known online LaTeX editor, I figured out, \bibliographystyle{} is required for compiling the bibliography. Uncommenting it made it show up.