The code below shows a .bib file generated with KBibTex which is meant to be a general database for some articles to be written from now on.
@comment{x-kbibtex-personnameformatting=<%l><, %f>}
@book{leh,
author = "Cox, Michael M. and Nelson, David L.",
edition = "5",
publisher = "Omega",
title = "{Lehninger: Principles of Biochemistry}",
year = "2007"
}
@book{lev1,
author = "Levine, Ira N.",
edition = "5",
publisher = "McGraw Hill",
title = "{F{\'i}sicoqu{\'i}mica}",
volume = "1",
year = "2004"
}
@book{lev2,
author = "Levine, Ira N.",
edition = "5",
publisher = "McGraw Hill",
title = "{F{\'i}sicoqu{\'i}mica}",
volume = "2",
year = "2004"
}
@book{reg,
author = "Gonz{\'a}lez, J. R. Regueiro and Lamesa, C. L{\'o}pez and Rodr{\'i}guez, S. Gonz{\'a}lez and Naves, E. Mart{\'i}nez",
booktitle = "{Biolog{\'i}a y patolog{\'i}a del sistema inmune}",
edition = "4",
publisher = "Panamericana",
title = "{Inmunolog{\'i}a}",
year = "2010"
}
I am well able to use it with some styles such as plain, vancouver, ieeetr, etc. However, when using some others, specially chicago and harvard based, I obtain error messages.
For example: when using dcu (harvard based) I get:
! Undefined control sequence.
l.3 \harvarditem
{Cox \harvardand\ Nelson}{2007}{leh}
?
As that sequence is not written on the .bib, it must be, odd enough, generated by bibtex into .bbl.
Any idea how to fix this? Do I need to edit the .bbl? How to?
Thanks in advance to all of you.
P.S.: might be useful to notice I am using the article template provided by texworks with babel for spanish.
EDIT Oct 9 2013
Here's a MWE:
\documentclass[12pt]{article}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\begin{document}
\nocite{*}
\bibliography{Docs/latex/books.bib}
\bibliographystyle{dcu}
\end{document}
where books.bib is the code I post before.
However, when making the MWE I found that compiling has some sort of influence in the error. I. e.: I was able to run it properly only once right after erasing the useless parts of the document but never after, even though, I 've tried deleting all the auxiliar files. I am even more puzzled than before.
Hope this helps.
Best Answer
The
dcu
bibliography style cannot be used “alone”, but it must be supplemented by the call to theharvard
package:You may be willing to look at the
natbib
package that also features “Harvard style” citations.