25

This question led to a new feature in a package:
biblatex

Many biblatex citation styles feature the \textcite command which is "intended for use in the flow of text, replacing the subject of a sentence" (manual, section 3.6.2). At the moment, this works well for citations of single works -- e.g. (assuming the authoryear style), one may write in the source

The reference work is \textcite{knuth:ct:a}.

which will be typeset as

The reference work is Knuth (1984).

Citing multiple works, on the other hand, is somewhat tedious. If one simply writes (1):

Important works are \textcite{knuth:ct:a,knuth:ct:b,markey}.

the output is rather a list than a correct sentence (2):

Important works are Knuth (1984); Knuth (1986); Markey (2005).

One has to write (3):

Important works are \textcite{knuth:ct:a}, \textcite{knuth:ct:b}, and \textcite{markey}.

to get (4):

Important works are Knuth (1984), Knuth (1986), and Markey (2005).

Can \textcite be modified so that input (1) will yield output (4), hereby achieving a tighter integration "in the flow of text"?

\documentclass{article}

\usepackage[style=authoryear]{biblatex}

\addbibresource{biblatex-examples.bib}

\begin{document}

This is how \texttt{\textbackslash textcite} currently works:\\
Important works are \textcite{knuth:ct:a,knuth:ct:b,markey}.

\bigskip

But I'd like \texttt{\textbackslash textcite} to output the following:\\
Important works are \textcite{knuth:ct:a}, \textcite{knuth:ct:b}, and \textcite{markey}.

\printbibliography

\end{document}

1 Answer 1

22

Upgrade to the the latest biblatex version. As of biblatex 2.7, this feature has been incorporated into all of the standard styles, including authoryear and its variants. Here's an example.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[american]{babel}
%\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage[style=authoryear]{biblatex}
%\usepackage[style=authoryear-comp]{biblatex}

\addbibresource{biblatex-examples.bib}
\begin{document}
\subsection*{\texttt{authoryear} and \texttt{\textbackslash textcite}}
%\subsection*{\texttt{authoryear-comp} and \texttt{\textbackslash textcite}}
\textcite{knuth:ct:a,knuth:ct:b} \\
\textcite{knuth:ct:b,markey} \\
\textcite{bertram,knuth:ct:a,knuth:ct:b} \\
\textcite{knuth:ct:a,knuth:ct:b,markey} \\
\textcite{markey,knuth:ct:a,knuth:ct:b,bertram}
\subsection*{\texttt{authoryear} and \texttt{\textbackslash textcites}}
%\subsection*{\texttt{authoryear-comp} and \texttt{\textbackslash textcites}}
\textcites(See)(for example){knuth:ct:a}{knuth:ct:b} \\
\textcites(See)(for example)[cf.][]{knuth:ct:b}[9--18]{markey} \\
\textcites[10--15]{knuth:ct:a}[cf.][]{knuth:ct:b}[9--18]{markey} \\
\textcites{bertram}{markey}{knuth:ct:a}{knuth:ct:b} \\
\textcites{companion}{knuth:ct:a}{knuth:ct:b} \\
\textcites{aristotle:poetics}{aristotle:rhetoric}{knuth:ct:a}{knuth:ct:b}
\end{document}

Here's the output with authoryear and american localization, which enables serial commas:

enter image description here

Here's the output with authoryear-comp and american localization:

enter image description here

Use of serial commas is not straightforward in nested lists, particularly in the verbose styles. Suggestions for improvements can be submitted to the biblatex github repo.

19
  • This is great! If I may ask a follow-up-question: Can you also modify \textcite for the authoryear-comp style so that my original example would result in Important works are Knuth (1984, 1986), and Markey (2005).?
    – lockstep
    Sep 14, 2011 at 22:08
  • @lockstep I'll take a look. You know, that comma before "and" (, and) bothers me. Are you wanting the comma to handle the case where maxcitenames > 1` and the first citation is a two-author work? For example: Smith and Doe (1998), and Markey (2005)?
    – Audrey
    Sep 14, 2011 at 22:17
  • Yes, this is a great solution. I'll delete mine. Sep 14, 2011 at 22:19
  • I think the comma before "and" is required in English for "enumerations" with at least three elements. On second thought, a) my example should read Knuth (1984, 1986) and Markey (2005) b) one would need to differentiate between \textcite with two vs. with at least three works in its argument.
    – lockstep
    Sep 14, 2011 at 22:23
  • 2
    @PLK No. I'll look at it within the next few months. This question is related to a more recent one: tex.stackexchange.com/q/89625/4483
    – Audrey
    Jan 29, 2013 at 14:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .