Wondering why the reference
\bibliographystyle{plain}
\bibliography{Reference}
does not appear in my pdf when I compile it?
Any help appreciated.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityWondering why the reference
\bibliographystyle{plain}
\bibliography{Reference}
does not appear in my pdf when I compile it?
Any help appreciated.
To discuss the situation we need a minimal working example (MWE) you did not add to your question. Let us start with the following one, copy it to your computer and name it mwe.tex
:
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@Book{Goossens,
author = {Goossens, Michel and Mittelbach, Frank and
Samarin, Alexander},
title = {The LaTeX Companion},
edition = {1},
publisher = {Addison-Wesley},
location = {Reading, Mass.},
year = {1994},
}
@Book{adams,
title = {The Restaurant at the End of the Universe},
author = {Douglas Adams},
series = {The Hitchhiker's Guide to the Galaxy},
publisher = {Pan Macmillan},
year = {1980},
}
\end{filecontents*}
\documentclass[12pt,a4paper]{article}
%\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\begin{document}
Text~\cite{adams} % citing one bib entry % <============================
\nocite{*} % all not cited bib entrys are shown in bibliography ...
\bibliographystyle{plain} % <===========================================
\bibliography{\jobname} % to use file created by filecontents ...
\end{document}
Package filecontents
is only used to have a bib file and the TeX code together in one compilable MWE.
To get a printed bibliography you need \cite{key}
to cite the bib entry key
, like:
Text~\cite{adams} % citing one bib entry % <============================
or use \nocite{*}
to get all not cited bib entrys printed in your bibliography.
The bibliography style plain
defines the layout of the printed bibliography.
\nocite{*} % all not cited bib entrys are shown in bibliography ...
To get the MWE compiled you need to follow the compiling chain (open your terminal/console and type the following commands):
pdflatex mwe.tex
to compile mwe.tex
and get file mwe.aux
we need for the next step:
bibtex mwe.aux
which results in a file mwe.bbl
containing the bibliography. Now type
pdflatex mwe.tex
pdflatex mwe.tex
to get the final document like this:
Check the documentation of your used editor how to start pdflatex
and bibtex
with it.
How does your Reference.bib
looks like?
\bibliography{Reference}
Imports the BibTeX file "Reference.bib" to display the bibliography.
To import several .bib files just write them comma-separated inside
the braces, the file extension is not necessary.
example:
@article{einstein,
author = "Albert Einstein",
title = "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
[{On} the electrodynamics of moving bodies]",
journal = "Annalen der Physik",
volume = "322",
number = "10",
pages = "891--921",
year = "1905",
DOI = "http://dx.doi.org/10.1002/andp.19053221004"
}
run bibtex:
pdflatex document.tex
bibtex Reference
pdflatex document.tex
pdflatex document.tex
references:
https://www.sharelatex.com/learn/Bibliography_management_with_bibtex https://www.latex-tutorial.com/tutorials/bibtex