Citing – BibTeX Natbib with Super Does Not Allow Occasional \citet

citingnatbib

I am using natbib with superscript numbered citations as follows:

\usepackage[super,comma,sort&compress]{natbib} 

It works great when I have the case This is a reference~\cite{author1999}. My reference appears as a superscript.

However, I occasionally want write something like: As shown by \citet{author1999} where I want the citation written out and not as a superscript. natbib in super mode inserts a superscript when using \citet.

Is there a way to have natbib use \citet in regular mode despite being in super mode? Can one change the mode temporarily to not have super and then switch it back on again?

Best Answer

Assuming you want a non-superscript numbered citation, you could define a new command \citenst that mimicks \citet but locally disables the settings of the superscript option.

\documentclass{article}

\usepackage[super,comma,sort&compress]{natbib}

\makeatletter
\newcommand*{\citenst}[2][]{%
  \begingroup
  \let\NAT@mbox=\mbox
  \let\@cite\NAT@citenum
  \let\NAT@space\NAT@spacechar
  \let\NAT@super@kern\relax
  \renewcommand\NAT@open{[}%
  \renewcommand\NAT@close{]}%
  \citet[#1]{#2}%
  \endgroup
}
\makeatother

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}

\begin{document}

This is a reference~\cite{A01}.

As shown by \citenst{A01}~\dots

As shown by \citet{A01}~\dots

\bibliographystyle{plainnat}
\bibliography{\jobname}

\end{document}

enter image description here

Related Question