28

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.

5

1 Answer 1

20

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

8
  • 1
    Any idea why this hasn't been integrated into the natbib core package?
    – mpacer
    Jul 29, 2016 at 20:23
  • 10
    and what about with biblatex instead of natbib?!
    – ebosi
    Sep 1, 2016 at 7:09
  • I'm going to guess because adding 's is not valid in some languages? Just a guess though. May 16, 2017 at 19:40
  • 2
    @ebo Check this question out.
    – LondonRob
    Mar 1, 2018 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 .... ? Sep 30, 2019 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.