# How to \citeauthor without switching to \bibliographystyle{plainnat}?

I know there are a few questions regarding this, but I couldn't find the solution specifically for such problem: how do I \citeauthor{}, but keep the citing style that I want (I use \bibliographystyle{ieeetr}).

My .tex file looks something like this:

\usepackage{natbib}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\citeauthor{smith}

\begin{document}
\bibliographystyle{ieeetr}
\bibliography{References}
\end{document}


And .bib file:

@Article{smth,
author ="Smith, Anton",
title  ="The title",
year  ="2019",
journal = "Some journal",
volume  ="1"}


I get the (author ?) instead of Anton.

So how would I keep my citing style but use \citeauthor?

• The ieeetr BibTeX style does not provide author and year information to natbib. So you can't use \citeauthor with it. It is theoretically possible to modify the style in a way to allow for author-year information being passed on, but that is a bit of work. If you have to use ieeetr there should be no pressing need to use \citeauthor. If you need \citeauthor it might be better to start using a different style (you don't have to use plainnat, a number of other styles also pass on author-year info to natbib). – moewe Mar 14 at 8:11
• In tex.stackexchange.com/q/439309/35864 it is shown how one can transplant plainnat's author-year info into a different style (iet.bst). The general procedure should be the same, but details could be different. – moewe Mar 14 at 8:13
• I see. Thank you @moewe. Could you recommend a style, similar to ieeetr, which passes author-year information to natbib? – Nigi Tanka Mar 14 at 9:18
• @laukinisgyvunelis - Please see the answer I just posted: Use the IEEEtranN bibliography style. – Mico Mar 14 at 9:24
• @moewe - Fortunately, the IEEE has provided sensible successors to the meanwhile prehistoric ieeetr bib style. If the author wants to use the machinery of the natbib package while keeping the distinctive IEEE "look" for formatted bibliographies, he/she should switch to the IEEEtranN bib style. – Mico Mar 14 at 9:58

The ieeetr bibliography style is more than thirty [30!] years old. Fortunately, the IEEE has come up with newer bib styles in recent years which (i) more or less produce the same formatted bibliographies and (ii) interact nicely with modern citation management packages, such as natbib.

In particular, if you want to be able to use the \citeauthor macro of the natbib package, you should switch to the IEEEtranN bib style. Its output, using the MWE file below, is as follows:

For comparison, this is what's produced if the ancient ieeetr bib style is used -- note the "(author?)" string in the place where the screenshot above shows "Smith" :

As you can see, the entry of type @article is formatted identically by both bib styles -- the difference is in how \citeauthor{smith} is processed.

Do also note that the natbib package should be loaded with the option numbers if one of the IEEEtranX bib styles is employed.

\RequirePackage{filecontents}
\begin{filecontents}{References.bib}
@article{smith,
author  = "Smith, Anton",
title   = "The title",
year    = "2019",
journal = "Some journal",
volume  = "1",
number  = "2",
pages   = "3--4",
}
\end{filecontents}

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage[numbers]{natbib}
\bibliographystyle{IEEEtranN} %%% or: \bibliographystyle{ieeetr}

\begin{document}
\cite{smith}, \citeauthor{smith}
\bibliography{References}
\end{document}

• In case you're curious about what I had in mind when I wrote that the old and new bib styles "more or less produce the same formatted bibliographies": the recent IEEEtran, IEEEtranN, etc bibliography styles do not ignore fields such as url and doi. In contrast, the ancient ieeetr style, which predates the inception of the world wide web by a decade or more, doesn't even know what to do with these fields and hence simply ignores them. – Mico Mar 14 at 10:00