14

Natbib's \citet command currently has the following output when I type \citet{maddison-cct,ridley-comparative}:

Maddison [8], Ridley [13]

Is there another command I did not found, or is there a way to redefine it so as to obtain the following instead?

Maddison [8] and Ridley [13]

(and more generally, I'd like \citet{x1,x2,...,xn} to output x1 [1], x2 [2], ..., xn-1 [n-1] and xn [n]).

  • 1
    Have you tried playing with the \bibpunct command? This will only work with the case of two citations, since it sets the separator between citations in a list. So for more than 2 it will yield x1 [1] and x2[2] and x3 [3] ... and xn [n] which is undesireable. – Willie Wong Oct 29 '10 at 9:42
  • No, I did not know about that, and as you said it won't really help. But thanks anyway. – Anthony Labarre Oct 29 '10 at 10:26
  • Barring better solutions, there's probably a way of hacking together a way to do it using etextools, which has nice list processing abilities (extending that of etoolbox). I can't install them on the computer I am using now; maybe I'll take a look later. – Willie Wong Oct 29 '10 at 10:28
  • (Essentially you can use \csvloop! to extract the list length, if it is more than 1 you can extract and delete the last element from the csvlist, process the rest using \citet, add the word "and", and process the remaining item using \citet.) – Willie Wong Oct 29 '10 at 10:30
  • 2
    I'm sure a biblatex solution would be possible. And likely easier. – Seamus Oct 29 '10 at 11:36
10

This sounded like a challenge, and I like challenges. This is what I came up with

% #1 {, } - #2 { and } - #3 \cmd - #4 list
\makeatletter
\newcommand\textlist[4]{%
  \let\last@item\relax
  \let\last@sep\relax
  \@for\@ii:=#4\do{%
    \ifx\last@item\relax\else
      \ifx\last@sep\relax
        \def\last@sep{#2}%
      \else#1\fi
      #3{\last@item}%
    \fi
    \let\last@item\@ii
  }%
  \ifx\last@item\relax\else
    \last@sep#3{\last@item}%
  \fi
}
\makeatother

\newcommand{\citett}{\textlist{, }{ and }{\citet}}

This defines a \textlist which basically applies a given command to a list of arguments, and using one of the two given separators as appropriate. Then you can write

\citett{paper1,paper2,paper3}

And produce something as if you had typed

\citet{paper1}, \citet{paper2} and \citet{paper3}

I encourage others to comment on possible improvements to my defined commands, and also suggest alternative definitions using other tool-boxes, TeX-flavors, etc.

  • This approach, when applied to instances of \citet with more than three arguments, unfortunately pretty much assures that the sentence being thrown at readers will be either very difficult or utterly impossible to comprehend. The \citet-with-multiple-arguments approach is also expressly discouraged by the user guide of the natbib package. If one really has to cite a multitude of pieces in support of some claim, one should use \citep instead of citet. – Mico Nov 20 '17 at 17:05
0

When authoryear-style and author-number citation call-outs are in use, the user guide of the natbib package (cf. page 9, lower half) expressly discourages the use of \citet with multiple arguments. An exception to this stricture -- not stated explicitly in the package's user guide but pretty much self-evident from the context -- occurs if the pieces being cited all have the same author(s). However, this exception doesn't apply to the example you've provided, does it?

The stricture against using \citet with multiple arguments does not apply to \citep, by the way. I.e., it's perfectly OK to use \citep with multiple arguments.

Especially if you're citing a multitude of pieces in support of or against some argument of claim, you should give strong preference to the \citep variant. To wit, one should never even contemplate writing something such as

Jones (1999), Miller (2000), Smith (2002), Strickland (2001) and Zwicki (1915) have all argued that ...

In English-language (and in many other languages too, I suppose) documents, a sentence that features a multi-part subject noun is bound to exhaust and/or distract readers unnecessarily. Do you want to risk committing this offense?

Back to your example: Writing \citet{maddison-cct,ridley-comparative} is simply bad and/or lazy. To assure a proper grammatical sentence structure, you should write either

\citet{maddison-cct} and \citet{ridley-comparative} have argued that ...

or choose the \citep approach, i.e., write something like

... is the main argument \citep[cf.][]{maddison-cct,ridley-comparative}.

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.