I wrote a report in latex before with a bib file, and it worked properly. However, I am writing a new report in Latex, and I have the references in a seperate bib file, but this report is not working. The only main difference is that I use a book and wikipedia as a references instead of mostly articles
I am using Texworks on Windows. After compiling the bib to generate a bbl, when I compile the tex file with: pdflatex + bibtex + pdflatex + pdflatex. When I tried that, the 'References' section shows up at the end, but I do not see the references, such as
- Reinhard, D.A. Case Study
I also do not see the citation in the paper
Here is the MWE: The tex is:
\documentclass{article}
%\usepackage{url,apacite} - had problems regardless if I included this or not
%\bibliographystyle{apacite} - same as above
\begin{document}
Alpha particles \cite{wikip} (named \cite{Comp} after and denoted by the first letter in the
Greek alphabet,\[\alpha\]) consist of two protons and two neutrons bound
together.
This means that an particle is a helium nucleus.
\bibliographystyle{plain}
\bibliography{BibName}
\end{document}
The bib for the first report was:
@article{example,
author = {Knuth, Donald E.},
year = {1986},
title = {The \TeX book},
}
The bib for my 2nd report is:
@misc{wikip,
author = "Wikipedia",
title = "Pen --- {W}ikipedia{,} The Free Encyclopedia",
year = "2014",
url = "\url{https://en.wikipedia.org/wiki/Pen}",
note = "[Online; accessed 14-December-2014]"
}
@book{Comp,
author = "Rub",
title = "Com",
year = "1997",
publisher = "John Wiley & Sons, Inc.",
address = "New York, New York"
}
What am I doing wrong?
Many thanks!
Best Answer
There are several errors; David Carlisle has already pointed out some of them in the comments.
You must "escape" the
&
symbol in the publisher field, i.e., write\&
.Since it looks like you want to use the
apacite
package and associated bibliography style, don't encase a URL string in\url{...}
. Instead, just writeurl = "...",
.Do fix the placement of the curly braces in the
title
field of the entry "wikip".