After adding a missing ,
after url = {https://doi.org/10.1038/nbt1026}
the following MWE compiles without error(s) and only one warning (caused by package filecontents
, which is okay):
\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},
}
@article{Wurm2004,
author = {Wurm, Florian M.},
doi = {10.1038/nbt1026},
file = {:C$\backslash$:/Users/sille/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Unknown - Unknown - R E V I E W.pdf:pdf},
journal = {Nature Biotechnology},
number = {11},
pages = {393--398},
title = {{Production of recombinant protein therapeutics in cultivated mammalian cells}},
url = {https://doi.org/10.1038/nbt1026},
volume = {22},
year = {2004}
}
\end{filecontents}
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{natbib}
\begin{document}
test \citep{Wurm2004} test
\nocite{*}
\bibliographystyle{agsm}
\bibliography{\jobname}
\end{document}
It results in the wanted output:
The document class you employ automatically loads the natbib
citation management package. There's also clearly a presumption that bibtex will be employed to create the bibliography. However, you're building the bibliography by hand. This implies, among other things, that you are in charge of every single aspect of what goes on inside the thebibliography
environment.
In the process of building each formatted bibliographic item using BibTeX, natbib
structures the header of each \bibitem
in a very specific way, so that its \citet
and \citep
instructions may find the information they need to create correctly-formatted citation call-outs. If you build the thebibliography
environment by hand, while still loading the natbib
package, you must replicate this structure or -- as you've discovered -- be inundated by lots of warning and/or error messages, as well as be left with unusable citation call-outs.
Here are three suggestions for how you might proceed.
Don't load natbib
, i.e., comment out (or delete) the option natbib
and the \bibpunct
instruction. Clearly, this is the lazy way. Note that this approach will generate numeric-style citation call-outs, which your journal may or may not accept.
Rewrite the headers of each \bibitem
list item. E.g., instead of
\bibitem{science-contrib} Broy, M.: ...
...
\bibitem{science-DOI} Slifka, M.K., Whitton, J.L.: ...
write
\bibitem[Broy(2002)]{science-contrib} Broy, M.
...
\bibitem[Slifka and Whitton(2000)]{science-DOI} Slifka, M.K., Whitton, J.L.: ...
As I hope you have guessed by now, the material in square brackets is read by natbib
in order to create authoryear-style citation call-outs to the entries with keys science-contrib
and science-DOI
.
Learn how to use BibTeX. In the medium to longer run, you'll save yourself a huge amount of time and effort. Concentrate on writing your papers, and delegate to BibTeX the task of creating properly and consistently-formatted bibliographies. You, and the readers of your papers, will benefit.
Best Answer
The following solution uses
biblatex
:Edit: Of course, if you're happy with the standard numeric style, there is an even simpler solution with
biblatex
, because one can make the difference betweencitestyle
andbibstyle
.