Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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!)

share|improve this question
add comment

3 Answers

up vote 7 down vote accepted

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}
share|improve this answer
    
Paul, your solution and @Samuel's are both wonderful. I really struggled to decide which was the best to accept. In the end, I decided that since your answer came a hair's width closer to addressing my question as asked, and since with \map directives you gave me extra insight into biblatex solutions, I leaned toward your answer ever so slightly more. FYI, in the end I got exactly what I wanted by, in conjunction with your code, adding this line of sed code: s/\(collaborator\)\([ ]*=[ ]*{[^}]* and [^}]*}\)/\1s\2/g to my already existing .bib file pre-processing script. –  Nikki Aug 22 '12 at 10:58
    
That's a neat solution: I thought of trying to do it using \step[match=...], but I'm afraid my fortitude deserved me! –  Paul Stanley Aug 22 '12 at 11:55
add comment

According to biblatex's manual, handeling collaborators can be achieved by setting the list in a editor fiels and using editortype=collaborator.

For biblatex, this tells semantically that you want it to consider that you are not giving an editor entry but a collaborator one, as they didn't want to multiply too much the new keys in order to keep it quite standard.

You can also specify the way you want it to refer to the collaborator.

  • By default, the collaborator keyword translated into collaborator or collab. for the short version.
  • The bycollaborator keyword translates into in collaboration with or in collab with.
  • You can also use the key collaborators which translates into collaborators or collab..

Note however that this doesn't seem to behave quite as described by the documentation on my computer and that the keywords translations are not available for every language.

Also these keys are followed by a bunch of % FIXME: unsure in the language files, so maybe it still doesn't work quite properly.

When you give to biblatex a list of names, you should separate every names by and keyword as the comma is recognised as a name/surname separator. So there, biblatex does interpret your entry as David Spurett and John Collier.

So you should have something like this:

@book{LadymanRoss07,
   author = {Ladyman, James and Ross, Don},
   editor = {David Spurrett and Collier, John},
   editortype = {collaborator},
   title = {Every Thing Must Go: Metaphysics Naturalized},
   publisher = {Oxford University Press},
   year = {2007}
}

I think this should work for you. On my test document, by using the english language, I obtain the folloging :

[1] James Ladyman and Don Ross. Every Thing Must Go: Metaphysics Naturalized. In collab.
    with David Spurrett, Collier, and John. Oxford University Press, 2007.

This seems to be pretty much what you are expecting.

share|improve this answer
1  
Right, I'm sorry for that. This was supposed to be kind of a rhetorical question. I have edited by changing the formulation to a more affirmative one and giving the result of my tests with this. I also made a slight correction (I shouldn't have used braces for the keyword bycollaborator in order to have proper translations. I hope this is better. Thank you for your direction to a better way of answering (I'm pretty new in there). –  Samuel Albert Aug 20 '12 at 12:24
1  
As I said in my answer, biblatex detects and as a list separator and not as a word. For him, , is also a separator saying that the surname comes first and the first name second (mainly useful for surnames with particles. i.e. {de Rabutin Chantal, Marie} for Mme de Sevigne). Therefore, even if biblatex is pretty clever about what you give as an input, in order to be sure it doesn't get mistaken, you should always use and to separate names. Then, it will replace it by a comma if appropriate. –  Samuel Albert Aug 20 '12 at 12:50
    
@Samuel, thank-you very much for your answer. However, per my question, I would very much like a) to use the collaborator field (otherwise, if I am to use semantically inaccurate fields like editor and editortype, I might as well stay with the single annotator field, per my "awful solution"), and b) again per my question, I am seeking a solution that if possible distinguishes between With collaborator: and With collaborators: depending on the number of contributors in the list. [BTW, further to @Mico's comment, my list contains 2 not 3 people (your extra "and" is unnecessary).] –  Nikki Aug 20 '12 at 13:22
    
@Nikki Indeed the collaborator field you are refering to doesn't exist in biblatex and semantically speaking, the editortype={collaborator} entry means that it is in fact a collaborator you are refering to and not an editor. Then, you can use the keys collaborator and collaborators to distinguish between singular and plural. However, the texts included in the language files don't currently distinguish between both and you might have to overwrite the captions. @Mico Right, sorry, I thought it was 3 persons. I will edit. –  Samuel Albert Aug 20 '12 at 13:27
1  
If you want a "collaborators" field, you can add one to the datamodel with biblatex 2.0/biber 1.0. See section 4.5.3 of the current biblatex manual. Of course you would need to change the driver for @book to output the field. –  PLK Aug 20 '12 at 14:10
show 1 more comment

Here is an example of an other book with the same problem. This solution is from the MathSciNet. They use the note field in such a case.

@BOOK{Buergisser1997,
      AUTHOR = {B{\"u}rgisser, Peter and Clausen, Michael and Shokrollahi, M. Amin},
       TITLE = {{A}lgebraic {C}omplexity {T}heory},
      SERIES = {Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences]},
      VOLUME = {315},
        NOTE = {With the collaboration of Thomas Lickteig},
   PUBLISHER = {Springer-Verlag},
     ADDRESS = {Berlin},
        YEAR = {1997},
       PAGES = {xxiv+618},
        ISBN = {3-540-60582-7},
     MRCLASS = {68-02 (12Y05 65Y20 68Q05 68Q15 68Q25 68Q40)},
    MRNUMBER = {1440179 (99c:68002)},
  MRREVIEWER = {Alexander I. Barvinok},
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.