Biblatex Collaborators Field – How to Use and Customize

biblatex

I've been pulling my hair out the last several days trying to configure biblatex to handle single and multiple collaborators in bibliography entries. Exasperated sigh.

Given this example:

\documentclass{article}

\usepackage[style=authoryear]{biblatex}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@book{LadymanRoss07,
   author = {Ladyman, James and Ross, Don},
   collaborator = {David Spurrett and Collier, John},
   title = {Every Thing Must Go: Metaphysics Naturalized},
   publisher = {Oxford University Press},
   year = {2007}
}
\end{filecontents}

\addbibresource{\jobname.bib}
\nocite{*}

\begin{document}
\printbibliography
\end{document}

how can I elegantly achieve:

Ladyman, James and Don Ross (2007). Every Thing Must Go: Metaphysics Naturalized. 
With collaborators: David Spurrett and John Collier. Oxford University Press.

in the output, and With collaborator: if only one collaborator were involved?

FYI, my current most unsatisfactory "fix" involves changing collaborator = to annotator = wherever it appears in my .bib files, and adding

\DefineBibliographyStrings{english}{
  withannotator = With collaborators:\addspace ,
}

to my biblatex configuration code. (This is clearly an awful "solution" in a multitude of ways!)

Best Answer

I think that the most appropriate way to enable you to have "collaborator" in the database and still use the standard styles without fiddling with any drivers is to add a sourcemap (you will need Biber 1.0+ and biblatex 2.0+).

The "magic" here is in the \DeclareSourcemap section, which basically works as follows:

  1. Identify entries with a collaborator field: if the entry doesn't have such a field process it no further: \step[fieldsource=collaborator, final=true]

  2. Copy the collaborator field to the editora field: \step[fieldtarget=editora, origfieldval]

  3. Set the editoratype field to "collaborator": \step[fieldset=editoratype, fieldvalue=collaborator

If you were happy with the "standard" formatting ("In collab[oration] with") that would be all you needed. A bit of extra complexity creeps in because you want a different format, "With collaborator(s)". The trouble here is that in the "bytype" string, the standard biblatex styles don't attempt to distinguish between single and multiple names. At that point you have three options:

  1. If you want to keep things simple, roll with the punches and accept a format which can work for one or many collaborators, such as the default. This is simplest, and unless you are wedded to the "with collaborators" formula probably best. If so, you could delete the whole of the second map step, the \newbibliographystring and the definition of a bycollaborators string.

  2. If you want to be "correct", rewrite internal macros to identify multiple names and print appropriately different introductory strings. This would be quite a bit of work, and probably more than is really justifiable.

  3. Distinguish in the .bib file itself between one and multiple collaborators, by using "collaborator" for one and "collaborators" for two. As far as biblatex is concerned it is then dealing with quite different "types" ("collaborators" might as well be "turnipwranglers" as far as it's concerned), but by defining a suitable bibstring to handle the plural form the problem is solved. That's not perfect, but it seems acceptable, and so that's what I've done here.

The end result, given your input fractionally changed so that "collaborator" becomes "collaborators" (for reasons explained above) is as follows:

enter image description here

\documentclass{article}
\usepackage{filecontents}

\usepackage[style=authoryear,backend=biber]{biblatex}

\DeclareSourcemap{
 \maps[datatype=bibtex,overwrite=false]{
  \map{
    \step[fieldsource=collaborator, final=true]
    \step[fieldset=editora, origfieldval]
    \step[fieldset=editoratype, fieldvalue=collaborator]
  }
  % THIS MAP STEP IS ONLY THERE TO ENABLE US TO USE "COLLABORATORS"
  % AS WELL AS "COLLABORATOR", BECAUSE THE QUESTION WANTS TO USE THE
  % "WITH COLLABORATORS" INTRODUCTION
  \map{
    \step[fieldsource=collaborators, final=true]
    \step[fieldset=editora, origfieldval]
    \step[fieldset=editoratype, fieldvalue=collaborators]
   }
 }
}
\NewBibliographyString{bycollaborators}% ONLY FOR "WITH COLLABORATORS"

\DefineBibliographyStrings{english}{%
  bycollaborator  = {with collaborator\addcolon\space},
  % AND ONLY FOR "WITH COLLABORATORS"
  bycollaborators = {with collaborators\addcolon\space}}

\begin{filecontents}{\jobname.bib}
@book{LadymanRoss07,
   author = {Ladyman, James and Ross, Don},
   collaborators = {David Spurrett and Collier, John},
   title = {Every Thing Must Go: Metaphysics Naturalized},
   publisher = {Oxford University Press},
   year = {2007}
}
\end{filecontents}

\addbibresource{\jobname.bib}
\nocite{*}

\begin{document}
\printbibliography
\end{document}
Related Question