27

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.

  • 10
    You could create a command such as \possessivecite, defined as \newcommand{\possessivecite}[1]{\citeauthor{#1}'s \citeyear{#1}}. The command \possessivecite is defined in the harvard citation management package, by the way. – Mico Jul 27 '13 at 18:26
  • 1
    It seems this question has at least two possible duplicates: tex.stackexchange.com/q/6613 and tex.stackexchange.com/q/8159 – Audrey Jul 28 '13 at 4:10
  • 2
    @Audrey Let's make the present one the original. – lockstep Jul 28 '13 at 8:49
19

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}

enter image description here

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

enter image description here

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
...

enter image description here

  • 1
    Any idea why this hasn't been integrated into the natbib core package? – mpacer Jul 29 '16 at 20:23
  • 6
    and what about with biblatex instead of natbib?! – ebosi Sep 1 '16 at 7:09
  • I'm going to guess because adding 's is not valid in some languages? Just a guess though. – Leif Andersen May 16 '17 at 19:40
  • 2
    @ebo Check this question out. – LondonRob Mar 1 '18 at 17:40
  • 1
    @JasonHemann Sure. Although have you ever seen a paper that cited someone in the plural? I guess maybe if they have the same last name and the author was being a bit informal? e.g. The Cousots' (2014) work clearly indicates .... ? – Leif Andersen Sep 30 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.