How can I change the font style of the authorname in a citation like \citep{}
to \textsc
?
I tried changing the command of \citep
to \textsc{\citep}
(see MWE).
But this of course creates problems with multiple authors, as i don't want any "and" printed in \textsc as well.
But there must be a way to refer to the authorname similar to \bibfont
being the reference to the fontstyle of the bibliography.
I read the natbib documenation and searched this forum. similar problems only focused on the package biblatex. However, let's assume I don't want to change the package.
Note: this is not the same question as this: Format natbib font style (which is about fontstyles in the bibliography):
MWE:
\documentclass[]{scrartcl}
\usepackage[authoryear,sort]{natbib}
\usepackage{filecontents}
\begin{filecontents}{bib.bib}
@artice{who,
author={Dr Who},
title={said that},
year={2017}
}
@artice{no,
author={Dr No},
title={said otherwise},
year={2017}
}
\end{filecontents}
\begin{document}
\makeatletter
\renewcommand{\cite}[1]{\textsc{\citeauthor{#1}} (\citeyear{#1})}
\renewcommand{\citep}[1]{(\textsc{\citeauthor{#1}} \citeyear{#1})}
\makeatother
I say this \citep{who,no}.
\cite{who} said that.
\bibliographystyle{dinat}
\bibliography{bib}
\end{document}
bst
file used bynatbib
. The package documentation states that you can declare custombst
files in anatbib.cfg
file.\bibliographystyle{dinat}
already takes care of that. For the in-text citations, it seems you have to redefine the internal macro `\NAT@nmfmt'. See answer below for details.