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'm wondering on how to get the plural version of "volume" with biblatex when mentioning several numbered volumes? Something like:

@BOOK{ref,
author =       "author",
title =        "title",
year =         "year",
publisher =    "publisher",
location =     "location",
volume =       "1-2-4"
}

Using key "volumes" is not the solution.

share|improve this question
add comment

2 Answers

up vote 10 down vote accepted

According to section 2.2.2 of the biblatex documentation, the volume field is intended for
"[t]he volume of a multi-volume book or a periodical" (note the missing plural form!), while the volumes field should be used for "[t]he total number of volumes of a multi-volume work". If you want to cite some, but not all volumes of a multi-volume work, the correct way seems to be to use multiple bibliography entries (one for each volume, and possibly one for the work as a whole).

EDIT: Inspired by Willie Wong's comment: You could only include the multi-volume work as a whole in the bibliography and cite single volumes in the text using the \volcite command; its syntax is \volcite[prenote]{volume}[page]{key}. See section 3.6.6 of the documentation for details.

EDIT2: I've managed to create a somewhat hacky solution. For every bibliography entry that actually represents several volumes of a multi-volume work, you have to add the execute field - and within this field, some tailor-made TeX code. Here's a working example:

EDIT3: pluton: Now that you mention it ... surely. I've replaced the execute stuff with a simple test using \iffieldnum (see p. Section 4.6.2 of the biblatex documentation for details). No need anymore to manually add fields to the bib-file.

\documentclass{article}

\usepackage{biblatex}

\DeclareFieldFormat{volume}{%
  \iffieldnum{volume}{%
    \bibstring{volume}~#1%
  }{%
    \bibstring{volumes}~#1%
  }%
}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@BOOK{ref1,
author = "author",
title = "title",
year = "year",
publisher = "publisher",
location = "location",
volume = "1-2-4",
}
@BOOK{ref2,
author = "author",
title = "title",
year = "year",
publisher = "publisher",
location = "location",
volume = "3",
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}
share|improve this answer
2  
What about \cite[Vols.\ 1, 2, and 4]{MultiVolumeWork}? If you need to cite multiple volumes it seems a bit redundant to have one for each volume in the bibliography. –  Willie Wong Nov 21 '10 at 11:54
    
nice! Thanks! maybe you could remove the execute field by a simple test on the next character after the volume, 1 in the current example, in the volume field? Is that feasible? –  pluton Nov 22 '10 at 0:27
    
Nice, this is working very well! I'm using the french version of volume/volumes and your patch translated it automatically!! –  pluton Nov 22 '10 at 13:58
    
That's the magic of biblatex. :-) It is also possible to switch languages "on a per-entry basis in the bibliography", see p. 43-44 of the documentation. –  lockstep Nov 22 '10 at 14:05
1  
IMO, merging several (but not all) volumes of a multi-volume work into a single bibliography entry is a "matter of taste", and Philipp Lehman, the author of biblatex, has stated several times that matters of taste should be implemented by custom styles. –  lockstep Nov 22 '10 at 16:25
show 1 more comment

I think the best solution would be to have the total number of volumes in the volumes field and to use the \volcite command. However, this command is intended for a citation of a single volume only. You could define a command \volscite based on \volcite (see attached example). But be aware that this definition makes heavily use of internal commands and thus might change in future versions of biblatex. So, the even better solution would be to submit a feature request. Here is a MWE:

\documentclass[english]{scrartcl}
\listfiles
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@BOOK{book,
  author = {Buchautor, Hans-Wilhelm},
  title = {Irgendein Buch},
  address = {Buch am Wald},
  year = {2000}
}
\end{filecontents}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel,csquotes}

\usepackage{biblatex}
\bibliography{\jobname}

\makeatletter
\newrobustcmd*{\volscite}{\volscitecmd\cite}

\newrobustcmd*{\volscitecmd}[1]{%
  \begingroup
  \def\blx@tempa{\endgroup#1}%
  \@ifstar
    {\appto\blx@tempa{*}%
     \blx@volscitecmd@i}
    {\blx@volscitecmd@i}}

\def\blx@volscitecmd@i{%
  \@ifnextchar[%]
    {\blx@volscitecmd@ii}
    {\blx@volscitecmd@ii[]}}

\def\blx@volscitecmd@ii[#1]#2{%
  \appto\blx@tempa{[#1]}%
  \@ifnextchar[%]
    {\blx@volscitecmd@iii{#2}}
    {\blx@tempa[\blx@volscite@vol{#2}]}}

\def\blx@volscitecmd@iii#1[#2]{%
  \blx@tempa[\blx@volscite@vol{#1}\blx@volcite@page{#2}]}

\protected\def\blx@volscite@vol#1{%
  \bibstring{volumes}\ppspace#1}
\makeatother

\begin{document}
\volscite{1--2}{book}

\volscite[see also]{1--2}{book}

\volscite{1--2}[45]{book}

\volscite[cf.]{1--2}[120]{book}
\end{document}
share|improve this answer
    
thanks for the piece of code but I am in a \nocite{*} approach. I think a feature request is required for this. –  pluton Nov 21 '10 at 18:26
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.