GeneralReferences do not appear

LaTeX specific issues not fitting into one of the other forums of this category.
nounouuuuu201186
Posts: 36
Joined: Sun May 20, 2012 6:28 am

References do not appear

Post by nounouuuuu201186 »

Hi,

I compile my document LaTeX by using "latex" then I convert DVI to PDF but I have a problem with references that not appear after compiling.
any help?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: References do not appear

Post by Stefan Kottwitz »

Compile several times. At the first time, references are written to the .aux file, which can be read in by LaTeX during the next run.

Stefan
LaTeX.org admin
nounouuuuu201186
Posts: 36
Joined: Sun May 20, 2012 6:28 am

Re: References do not appear

Post by nounouuuuu201186 »

Hi,

I did not understand you :( . Could you clarify further?

NB:
I compile file.tex once with "LaTeX". Then, file.aux once with "BibTeX". Then, twice file.tex with "LaTeX". Finally, I convert DVI to PDF.But, references still not appear :( .
Bob_the_Topper
Posts: 15
Joined: Thu May 03, 2012 4:54 pm

References do not appear

Post by Bob_the_Topper »

nounouuuuu201186 wrote:Hi,
I compile my document LaTeX by using "latex" then I convert DVI to PDF but I have a problem with references that not appear after compiling.
any help?
I don't understand your problem and you did not provide a MWE. Is it only some references that do not work or is there no bibliography at all? The following example works fine for me:

Code: Select all

\begin{filecontents}{lit.bib}
@misc{ mybook,
	author = "Bob",
	title = "Some title",
	year = "2012"
}
\end{filecontents}


\documentclass{article}
\usepackage[utf8]{inputenc}

\begin{document}
Blah, blah, blah -- also see \cite{mybook} -- blah, blah, blah.

\clearpage
\bibliographystyle{alphadin}
\bibliography{lit}

\end{document}

BTW: Is there any reason for not using pdflatex directly when you want an PDF anyway?
nounouuuuu201186
Posts: 36
Joined: Sun May 20, 2012 6:28 am

References do not appear

Post by nounouuuuu201186 »

Hi Bob_the_Topper,

there is no bibliography at all. I don't use PDFLaTeX because my images are in EPS format. My file "references.bib" is attached. In the document I call references like this:

Code: Select all

... des réseaux complexes\cite{DA08}
The bibliography is set up this way.

Code: Select all

\bibliographystyle{apalike-fr}
\bibliography{references}
\bibliographystyle{plain}
\end{document}
Could I send you the hole package to see where is the problem?
Attachments
references.bib
(11.9 KiB) Downloaded 912 times
Bob_the_Topper
Posts: 15
Joined: Thu May 03, 2012 4:54 pm

References do not appear

Post by Bob_the_Topper »

nounouuuuu201186 wrote: there is no bibliography at all.
Does the example I gave work on your system? Just put all the code in a .tex file and run the usual sequence of latex and bibtex on it.
nounouuuuu201186 wrote: this is the content of my file references.bib:

Code: Select all

[...]
@article{DA08,
	Author = "da  Fontura  Costa,  L.,  O.  N.  Oliveira  Jr.,  et  al. ",
	Journal = "	arXiv:0711.3199v3 [physics.soc-ph]",
      Year = "2008",
	Number = "",
	Pages = "",
	Title = "Analyzing and Modeling Real-World Phenomena with Complex Networks: A Survey of Applications",
	Volume = ""
	
}
[...]
}
This is the problem. When I use this entry BibTeX will not even accept the file and except throws an error
Too many commas in name 1 of "da Fontura Costa, L., O. N. Oliveira Jr., et al." for entry DA08
while executing---line 1185 of file alpha.bst
Too many commas in name 1 of "da Fontura Costa, L., O. N. Oliveira Jr., et al." for entry DA08
while executing---line 1185 of file alpha.bst
Too many commas in name 1 of "da Fontura Costa, L., O. N. Oliveira Jr., et al." for entry DA08
while executing---line 1250 of file alpha.bst
(There were 3 error messages)
Always pay attention to error messages!

You need to seperate multiple authors with and, not commas - have a look here for details. Also there's no use in empty field. The above entry should read:

Code: Select all

@article{DA08,
	Author = "da Fontura Costa, L. and Oliveira, Jr., O. N.",
	Journal = "arXiv:0711.3199v3 [physics.soc-ph]",
	Year = "2008",
	Title = "Analyzing and Modeling Real-World Phenomena with Complex Networks: A Survey of Applications"
}
Note, that "et al" is not really expected in BibTeX entries. You should give all the authors and BibTeX will decide how many are actually put in the bibliography.
nounouuuuu201186
Posts: 36
Joined: Sun May 20, 2012 6:28 am

References do not appear

Post by nounouuuuu201186 »

Does the example I gave work on your system? Just put all the code in a .tex file and run the usual sequence of latex and bibtex on it.
Your example doesn't work on my system. I compiled the "file.tex" once with LaTeX then once with BibTeX and twice with LaTeX.But, there are problems. I try also with PDFLaTeX once then BibTeX once then twice PDFLaTeX:

Code: Select all

pdflatex doctest && bibtex doctest && pdflatex doctest && pdflatex doctest
and I got the attached log.
Attachments
doctest.log
(1.54 KiB) Downloaded 670 times
Bob_the_Topper
Posts: 15
Joined: Thu May 03, 2012 4:54 pm

References do not appear

Post by Bob_the_Topper »

nounouuuuu201186 wrote: your example doesn't work in my system.
Sorry, my fault. I used an uncommon bibliography style in the example. How about this:

Code: Select all

\begin{filecontents}{lit.bib}

@article{DA08,
	Author = "da Fontura Costa, L. and Oliveira, Jr., O. N.",
	Journal = "arXiv:0711.3199v3 [physics.soc-ph]",
	Year = "2008",
	Title = "Analyzing and Modeling Real-World Phenomena with Complex Networks: A Survey of Applications"
}

}
\end{filecontents}


\documentclass{article}
\usepackage[utf8]{inputenc}

\begin{document}
Blah, blah, blah -- also see \cite{DA08} -- blah, blah, blah.

\clearpage
\bibliographystyle{plain}
\bibliography{lit}

\end{document}
nounouuuuu201186 wrote:I compiled the file.tex once with Latex then once with bibteTex and twice with Latex.
That's correct.
Before you try the new example, please remove the old "lit.bib". Otherwise latex will not update this file and you'll end up with an undefined reference...
nounouuuuu201186 wrote: and I got:
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
entering extended mode
[...]
LaTeX Warning: Citation `mybook' on page 1 undefined on input line 14.
[...]
Is this from the last run of (pdf)latex? There should be no undefined references at that point...
nounouuuuu201186
Posts: 36
Joined: Sun May 20, 2012 6:28 am

References do not appear

Post by nounouuuuu201186 »

Now it is working. For my example I only remove the uncommon bibliography style:

Code: Select all

\bibliographystyle{apalike-fr}
instead of:

Code: Select all

... \bibliographystyle{apalike-fr}
\bibliography{references}
\bibliographystyle{plain}
\end{document}
I only make:
...
\bibliography{references}
\bibliographystyle{plain}
\end{document}
and references appear :)
Isn't possible to use an uncommon bibliography style like \bibliographystyle{apalike-fr}?
Bob_the_Topper
Posts: 15
Joined: Thu May 03, 2012 4:54 pm

References do not appear

Post by Bob_the_Topper »

nounouuuuu201186 wrote: Isn't possible to use an uncommon bibliography style like \bibliographystyle{apalike-fr}?
Of course it's possible to use "uncommon" styles, but you need the corresponding .bst file on your system.

In your case BibTeX should have shown an error like the one you got with my first example. Something like:
I couldn't open style file apalike-fr.bst
All you need to do is provide BibTeX with that file and you can use that bibliography style. Unfortunately it depends on your system how and where to get the file. If your packet manager doesn't provide the necessary file you can still get it from CTAN and copy it wherever all the other .bst files are on your file system.
Post Reply