# Problems with bib containing wiki and book reference

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

1. 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!

• I deleted biblatex and footmisc tabs which don't seem related. – David Carlisle Dec 15 '14 at 0:47

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 write url = "...",.

• Do fix the placement of the curly braces in the title field of the entry "wikip".

\documentclass{article}
\usepackage{apacite}
\bibliographystyle{apacite}
\usepackage{url}
\usepackage{filecontents}
\begin{filecontents*}{BibName.bib}
@misc{wikip,
author = "Wikipedia",
title = "Pen --- {Wikipedia, The Free Encyclopedia}",
year = "2014",
url = "https://en.wikipedia.org/wiki/Pen",
note = "Accessed 14-December-2014"
}
@book{Comp,
author = "Rub",
title = "Com",
year = "1997",
publisher = "John Wiley \& Sons, Inc.",
address   = "New York, New York"
}
\end{filecontents*}
\begin{document}
\cite{wikip}

\cite{Comp}
\bibliography{BibName}
\end{document}


 John Wiley & Sons,


has to be

 John Wiley \& Sons,


otherwise you will get an error on the & but then latex bibtex latex latex should produce the image shown. (Your description sounded like you ran bibtex first which would be incorrect)

• I made that change and it still won't work. I ran it pdflatex + biblatex + pdflatex+ pdflatex – user4352158 Dec 15 '14 at 0:50
• @user4352158 biblatex is not a program, your document is not using biblatex at all but bibtex changing & to \& is the only change I made to your posted code to produce the image I showed. if it didn't work then you did something wrong but can't say unless you show the exact error from the log – David Carlisle Dec 15 '14 at 1:00
• the bib file must be called BibName.bib @user4352158 – David Carlisle Dec 15 '14 at 1:01
• @user4352158 you must first delete the generated .bbl file with the & as it will generate errors and prevent latex completing. – David Carlisle Dec 15 '14 at 1:09