2

In my document, I will write something like this (using natbib, but that shouldn't matter too much):

\citet{reference} show that .....

which would render as

Jones et al (1990) show that....

(\citet in \natbib creates an 'author-list (year)' reference style)

Of course if {reference} was a single individual, I should have written

\cite{reference} shows that ....

rendering as

Jones (1990) shows that....

Since I'm lazy and can't take the extra 5 seconds to search the reference to see if it's a single author or not, is there conceivably an automated way to do pluralization ? Or some relatively simple macro that would look like

\IfRefIsPlural{reference}{show}{shows}

  • 1
    Are you sure your first example is grammatically correct. To me Jones and Smith (1990) seems like one thing. – StrongBad Feb 6 '14 at 21:52
  • 1
    I think that's right. 'Jones and Smith show...' but 'Jones and Smith (1990) shows...' because it is talking about a single article. At least, that sounds right to me. But that's presumably off-topic here. The question of whether it can be implemented is independent of whether it should be. – cfr Feb 6 '14 at 22:00
  • Maybe I should have posted on english.SE :). or at least the non-TeX part. – Suresh Feb 7 '14 at 0:19
2

With biblatex one could do the following:

\documentclass{article}

\usepackage[style=authoryear,natbib=true]{biblatex}
\addbibresource{biblatex-examples.bib}

% Used in some citations
\newcounter{totalnames}
\DeclareNameFormat{labelname}{%
    \setcounter{totalnames}{\value{author}}%
  \ifcase\value{uniquename}%
    \usebibmacro{name:family}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}%
  \or
    \ifuseprefix
      {\usebibmacro{name:given-family}
        {\namepartfamily}
        {\namepartgiveni}
        {\namepartprefix}
        {\namepartsuffixi}}
      {\usebibmacro{name:given-family}
        {\namepartfamily}
        {\namepartgiveni}
        {\namepartprefixi}
        {\namepartsuffixi}}%
  \or
    \usebibmacro{name:given-family}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}%
  \fi
  \usebibmacro{name:andothers}}

\newcommand{\IfRefIsPlural}[2]{%
    \ifnum\thetotalnames=1
        #1%
    \else%
        #2
    \fi%
}

\begin{document}

\citet{bertram} \IfRefIsPlural{shows}{show}

\citet{angenendt} \IfRefIsPlural{shows}{show}

\printbibliography  
\end{document}

enter image description here

(small caveat: this won't work for \citet{bertram,angenendt})

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.