# How can I use natbib to get both superscript-style citations and “authoryear”-style citations in the same document?

Depending on the context, I might prefer to use superscript-style citations (i.e. a recent paper\cite{paper} said XYZ --> a recent paper1 said XYZ) or author-year-style citations (i.e. \citet{paper} said XYZ --> John Smith (1990) said XYZ) in the same document. How can I do this with natbib?

I am aware that using \usepackage[super]{natbib} allows me to have superscript-citations with the \cite command. But this causes the \citet command to print "John Smith1 said XYZ" instead of the above, and causes the \citep command to print "1 said XYZ".

Is there any way I can sometimes use superscript-style citations, and sometimes use authoryear-style citations, using the natbib interface/some workaround?

Here's a quick example:

\documentclass[11pt]{article}
\usepackage[margin=0.5in]{geometry}
\usepackage[super,comma]{natbib}
\bibliographystyle{plainnat} % most basic and widely used bibliography style
\begin{filecontents}{\jobname.bib}
@article{ref1,
author = {Smith, John},
journal = {Very Important Journal},
title = {Very Important Paper},
year = {2000}
}
@article{ref2,
author = {Smith, John},
journal = {Another Very Important Journal},
title = {Another Very Important Paper},
year = {2001}
}
\end{filecontents}

% Body
\begin{document}
Results from \citep{ref1} and \citet{ref2} imply XYZ\cite{ref1,ref2}.
\bibliography{\jobname}
\end{document}


which produces

• Something similar was done in biblatex: khirevich.com/latex/bibliography – Oleg Lobachev Mar 15 '18 at 19:47
• Since you say you want to use natbib I have removed the biblatex tag. biblatex and natbib are two different packages and they are incompatible (biblatex offers an interface to emulate some of natbib's behaviour, but they are still fundamentally different and incompatible). An MWE may help us to understand your question better and get started more quickly. Often solutions depend on the styles used. – moewe Mar 15 '18 at 21:20
• @Mico Sometimes I want my citations to look like this: "a recent paper says XYZ<sup>1</sup>". This is the current default behavior of \cite when natbib is loaded with the super option. Other times I want to be able to do this: "according to John Smith (1990), XYZ" or this: "a recent paper (John Smith, 1990) says XYZ". These last two styles don't have to be accomplished with the citet or citep commands; perhaps they can be achieved with \specialhackycommandA and \specialhackycommandB. I am just trying to describe the behavior I desire. I am surprised this is still unclear. – Luke Davis Mar 16 '18 at 1:34

As you've discovered, if the super option of the natbib package is in place, both \cite and \citep generate just superscript-style numeric citation call-outs, while \citet generates a hybrid name-superscript citation call-out.

If natbib's super option is in effect, the commands \citename and \citeyear remain available. The following example document defines the macros \citeA, \citeY, \citeAYp, and \citeAYt to help you achieve your formatting needs. Note that I would recommend against redefining the behavior of the package's \cite, \citep, and \citet directly.

\RequirePackage{filecontents}
\begin{filecontents}{mybib.bib}
@article{ref1,
author  = {Smith, John},
journal = {Very Important Journal},
title   = {Very Important Paper},
year    = {2000},
}
@article{ref2,
author  = {Smith, John},
journal = {Another Important Journal},
title   = {Another Important Paper},
year    = {2001},
}
\end{filecontents}

\documentclass{article}

\bibliographystyle{plainnat}
\usepackage[super,comma]{natbib}
\newcommand\citeA[1]{\citeauthor{#1}}
\newcommand\citeY[1]{(\citeyear{#1})}
\newcommand\citeAYt[1]{\citeauthor{#1} (\citeyear{#1})}
\newcommand\citeAYp[1]{(\citeauthor{#1} \citeyear{#1})}

\begin{document}
\begin{tabular}{ll}
\verb+\cite+    & \cite{ref1}\\
\verb+\citep+   & \citep{ref2}\\
\verb+\citet+   & \citet{ref2}\\
\verb+\citeA+   & \citeA{ref1}\\
\verb+\citeY+   & \citeY{ref2}\\
\verb+\citeAYp+ & \citeAYp{ref2}\\
\verb+\citeAYt+ & \citeAYt{ref1}
\end{tabular}

\bibliography{mybib}
\end{document}

• If this were biblatex I would not be very happy with \newcommand\citeAYt[1]{\citeauthor{#1} (\citeyear{#1})} for lack of support for multiple citations and proper pre- and post-note rendering, but I guess with natbib that is the easiest solution. – moewe Mar 16 '18 at 7:52
• @moewe -- Thanks. The user guide of the natbib package discourages using \citet with multiple argments, unless all cited entries have the same set of authors and, presumably, differ in the values of the year field. The \citeAYt macro merely elevates this practice to "official policy". :-) Hopefully, the answer also points the OP in the right direction for creating (even) more sophisticated citation macros. A side comment: I don't understand the motivation for generating citation call-outs that are a hybrid of authoryear and numeric-superscript styles. But it's not my place to argue... – Mico Mar 16 '18 at 8:26
• Ah, I see... I think we discussed a similar topic before, because I remember being told about this restriction. Indeed the citation style is very odd. A reader may have a hard time finding the proper reference for the author-year call-outs, but at least the sorting is not counterproductive here. – moewe Mar 16 '18 at 8:42
• Thanks @Mico! BTW my motivation is in prose/style -- oftentimes I may want to talk about a paper in depth/explicitly, in which case the author-year citation is much more appropriate (e.g. "I am using the really cool science thing introduced by John Smith (1990)..."). But other times I may want to use a citation to offhandedly justify a statement, in which case the superscript is much more appropriate than author-year or parenthetical author-year, especially if I am citing several papers at once (e.g. "this science thing is well established<sup>1-3</sup>") – Luke Davis Mar 17 '18 at 4:28