0

Edit: Solution found. I need to use natbib package.

I like family name of the first author to appear in the referencing text body, e.g.

[Smith et al. (1999)] done this and that

when using IEEEtranN, the following output is produced

[Smith et al. (1999)Smith, Author2 and Author3] done this and that

How can I fix this behavior? Or any other alternative bibliography styles?

Example Code:

\documentclass{article}

\begin{filecontents}{\jobname.bib}
@book{key,
  author = {J. Smith and F. Author2 and S. Author3 and F. Author4},
  year = {1999},
  title = {What Smith and others done},
  publisher = {Journal Of This and That},
}
\end{filecontents}

\begin{document}

\cite{key} done this and that. 

\bibliographystyle{IEEEtranN}
\bibliography{\jobname}

\end{document}

output:

[Smith et al.(1999)Smith, Author2, Author3, and Author4] done this and that.

References

[Smith et al.(1999)Smith, Author2, Author3, and Author4] J. Smith, F. Au-thor2, S. Author3, and F. Author4,What Smith and others done. JournalOf This and That, 1999.

3
  • 1
    Please prepare a minimal working example with bibliography (MWEB) that allows others to reproduce the output you get.
    – leandriis
    Commented Jan 24, 2021 at 11:08
  • 2
    IEEEtranN is supposed to be used together with \usepackage{natbib}. The symptoms you are describing are consistent with not having loaded natbib. Note that IEEEtranN says that it is Not for normal IEEE work. So if you are preparing a document for IEEE submissions you probably should be using \bibliographystyle{IEEEtran} and not \bibliographystyle{IEEEtranN}.
    – moewe
    Commented Jan 24, 2021 at 11:34
  • Many thanks! it works. Yes I am just writing a technical report Commented Jan 24, 2021 at 11:48

1 Answer 1

4

The comments in IEEEtranN.bst say

%% IEEEtranN.bst
%% BibTeX Bibliography Style file
%% Natbib version of IEEEtran.bst
%% *** Not for normal IEEE work ***

Hence, \bibliographystyle{IEEEtranN} should be used together with natbib (and should not be used if you prepare a paper for submission to the IEEE).

So either load \usepackage{natbib}

\documentclass{article}

\usepackage{natbib}

\begin{filecontents}{\jobname.bib}
@book{key,
  author    = {J. Smith and F. Author2 and S. Author3 and F. Author4},
  year      = {1999},
  title     = {What Smith and others done},
  publisher = {Journal Of This and That},
}
\end{filecontents}

\begin{document}
\cite{key} done this and that.

\bibliographystyle{IEEEtranN}
\bibliography{\jobname}
\end{document}

Smith et al. (1999) done this and that.

or switch from \bibliographystyle{IEEEtranN} to \bibliographystyle{IEEEtran}

\documentclass{article}

\begin{filecontents}{\jobname.bib}
@book{key,
  author    = {J. Smith and F. Author2 and S. Author3 and F. Author4},
  year      = {1999},
  title     = {What Smith and others done},
  publisher = {Journal Of This and That},
}
\end{filecontents}

\begin{document}
\cite{key} done this and that.

\bibliographystyle{IEEEtran}
\bibliography{\jobname}
\end{document}

[1] done this and that.

1
  • I am writing only a technical report. The latter solution is not desired since I find referencing by family names the most appropriate. Commented Jan 24, 2021 at 16:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .