For school I have to write a paper and use the IEEEtran bibliography style:
\bibliographystyle{IEEEtran}
% argument is your BibTeX string definitions and bibliography database(s)
\bibliography{IEEEabrv,bibliography.bib}
Now I want to include the natbib package so I can cite my papers in the following way:
Cook et. al. [1]
The entry for that cite in my bib file is as follows:
@ARTICLE{cook2009ambient,
author = {Cook, D.J. and Augusto, J.C. and Jakkula, V.R.},
title = {Ambient intelligence: Technologies, applications, and opportunities},
journal = {Pervasive and Mobile Computing},
year = {2009},
volume = {5},
pages = {277--298},
number = {4}
}
Now if I include the natbib package it complains: "natbib bibliography not compatible with author-year citations" So I load it with option numbers but then my authors are not shown in the latex file.
So how can I cite in the explained way? Without changing anything of the bibliographystyle option. Thanks!
EDIT: I included the template we start with from school:
\documentclass[10pt,journal,compsoc,twoside,a4paper]{IEEEtran}
\usepackage{cite}
\usepackage[pdftex]{graphicx}
\usepackage[cmex10]{amsmath}
\usepackage{algorithmic}
\usepackage[tight,normalsize,sf,SF]{subfigure}
\usepackage{url}
\hyphenation{}
\begin{document}
\title{Butler Robot Localization Using Dash7 Technology}
\author
{
\thanks
{
}
}
\IEEEcompsoctitleabstractindextext{%
\begin{abstract}
\end{abstract}
\begin{IEEEkeywords}
\end{IEEEkeywords}}
% make the title area
\maketitle
\pagestyle{empty}
\thispagestyle{empty}
\IEEEdisplaynotcompsoctitleabstractindextext
\section{Example}
Example!
% references section
\bibliographystyle{IEEEtran}
% argument is your BibTeX string definitions and bibliography database(s)
\bibliography{IEEEabrv,bibliography.bib}
\vfill
\end{document}
Cook et al. [1]
, would appear to be an unusual hybrid of author-year and numeric citation styles. Are you sure you don't want to see the citation appear asCook et al. (2009)
, say? Please post a complete MWE (minimum working example), as your code snippets do not seem to permit a deep analysis of what's going on. E.g., I have a feeling that you're loading a document class that either already loads thenatbib
package or already sets up a numeric citation style. – Mico Mar 16 '13 at 14:09cite
package that's loaded by default provides some useful features when dealing with numeric citations. Unless you can convince your school to let you use an entirely different document class, I'm afraid there's probably no point in you trying to introduce an authoryear-style citation method for your document(s). – Mico Mar 16 '13 at 14:39IEEEtran.cls
document class file and theieeetran.bst
bibliography style file, I'm afraid you're not going to get authoryear-style citations in your document. :-( Incidentally, since you're using thecompsoc
document option, thecite
package should be loaded with thenocompress
option, i.e., as\usepackage[nocompress]{cite}
. See p. 7 of the user guide to theIEEEtran
document class, which notes that "One complication in compsoc mode is that the Computer Society does not compress, but does sort, adjacent citation numbers." – Mico Mar 16 '13 at 15:34