Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
    
Welcome to TeX.SE! Your proposed citation style, viz., 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 as Cook 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 the natbib package or already sets up a numeric citation style. –  Mico Mar 16 '13 at 14:09
    
Added extra snipped as you asked :) –  DanFritz Mar 16 '13 at 14:27
    
Thanks for providing the extra code. The IEEEtran document class indeed expects a numeric citation style, and the cite 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:39
    
@Mico I asked if its possible, another option would be to type it myself but thats against the idea of using LaTex. Is there any macro/custom command that I could use to achieve my goal? –  DanFritz Mar 16 '13 at 15:16
    
Short of doctoring some of the setup provided by the IEEEtran.cls document class file and the ieeetran.bst bibliography style file, I'm afraid you're not going to get authoryear-style citations in your document. :-( Incidentally, since you're using the compsoc document option, the cite package should be loaded with the nocompress option, i.e., as \usepackage[nocompress]{cite}. See p. 7 of the user guide to the IEEEtran 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
show 2 more comments

1 Answer

up vote 2 down vote accepted

You can get the following output:

Cook et. al. [1]

First you include the natbib package as follows:

\usepackage[numbers]{natbib}

Then download the IEEEtranN bibliography style (a simple google) and then put it in the same location as your latex file. Now change the following lines as follows:

\bibliographystyle{IEEEtranN}
\bibliography{IEEEabrv,bibliography}

You can now use citet and other natbib varians, the numbering will stay in the order it first appeared (and not the order of your bib file) and the reference layout is the same as with the IEEEtran bibliography style.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.