Is there an automatic way to attach a genitive apostrophe or " ' s " to an author's name?
Currently I use:
\citeauthor{kuran1989}'s \citeyear{kuran1989}
But since this comes up regularily I'd like to know whether there's a general solution.
Is there an automatic way to attach a genitive apostrophe or " ' s " to an author's name?
Currently I use:
\citeauthor{kuran1989}'s \citeyear{kuran1989}
But since this comes up regularily I'd like to know whether there's a general solution.
If you're using the natbib package, a possessive citation command should behave very much like the textual citation command \citet. This can be done by altering the name formatting command \NAT@nmfmt in the definition for \citet. One catch with this approach is that numeric styles don't apply \NAT@nmfmt, but you can make them do so by patching \NAT@test via the etoolbox package. (\NAT@test is a command used by the numeric styles to print textual citation labels.)
\documentclass{article}
\usepackage{natbib}
\usepackage[colorlinks]{hyperref}
\usepackage{etoolbox}
\makeatletter
% make numeric styles use name format
\patchcmd{\NAT@test}{\else \NAT@nm}{\else \NAT@nmfmt{\NAT@nm}}{}{}
% define \citepos just like \citet
\DeclareRobustCommand\citepos
{\begingroup
\let\NAT@nmfmt\NAT@posfmt% ...except with a different name format
\NAT@swafalse\let\NAT@ctype\z@\NAT@partrue
\@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
\let\NAT@orig@nmfmt\NAT@nmfmt
\def\NAT@posfmt#1{\NAT@orig@nmfmt{#1's}}
\makeatother
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{companion,
author = {Goossens, Michel and Mittelbach, Frank and Samarin, Alexander},
title = {The LaTeX Companion},
edition = {1},
publisher = {Addison-Wesley},
location = {Reading, Mass.},
year = {1994}}
@book{adams:life,
title = {Life, the Universe and Everything},
author = {Adams, Douglas},
series = {The Hitchhiker's Guide to the Galaxy},
publisher = {Pan Macmillan},
year = {1980}}
@book{adams:rest,
title = {The Restaurant at the End of the Universe},
author = {Douglas Adams},
series = {The Hitchhiker's Guide to the Galaxy},
publisher = {Pan Macmillan},
year = {1980}}
\end{filecontents}
\newcommand{\cmd}[1]{\textbackslash\texttt{#1}}
\begin{document}
\noindent
Compact \cmd{citet}: \citet{adams:life,adams:rest} \\
Compact \cmd{citepos}: \citepos{adams:life,adams:rest} \\
\cmd{citet} with postnote: \citet[pp.~10--20]{companion} \\
\cmd{citepos} with postnote: \citepos[pp.~10--20]{companion} \\
\cmd{citepos*} with postnote: \citepos*[p.~10]{companion}
\bibliographystyle{plainnat}
\bibliography{\jobname}
\end{document}

Loading natbib with \usepackage[numbers]{natbib} instead gives:

In English singular possessive nouns are formed typically by adding "'s", even when the name ends with "s" (e.g. "Adams's"). If the possessive should reflect pronunciation (i.e. "Adams'") you can extend the definition of \NAT@posfmt using the xstring package.
...
\usepackage{xstring}
...
\makeatletter
...
\def\NAT@posfmt#1{%
\StrRemoveBraces{#1}[\NAT@temp]%
\IfEndWith{\NAT@temp}{s}
{\NAT@orig@nmfmt{#1'}}
{\NAT@orig@nmfmt{#1's}}}
\makeatother
...

's is not valid in some languages? Just a guess though.
– Leif Andersen
May 16 '17 at 19:40
biblatex solution, or instead one for biblatex with the natbib=true compatibility (which provides e.g. \citet from biblatex).
– Jason Hemann
Sep 28 '19 at 21:49
\citepos above to support an unbreakable space between the possessive and citation, e.g., so Adams and [1980a,b] do not appear on separate lines?
– ZaydH
Jul 30 '22 at 00:23
\possessivecite, defined as\newcommand{\possessivecite}[1]{\citeauthor{#1}'s \citeyear{#1}}. The command\possessiveciteis defined in theharvardcitation management package, by the way. – Mico Jul 27 '13 at 18:26