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.

When I print the bibliography with a BOOK entry using the PART field, biblatex prints white space followed by a period before the PART field is printed. Is this a bug, or am I missing something?

\documentclass{article}
\usepackage{csquotes}
\usepackage[
        bibstyle = authoryear,
        citestyle = authoryear-comp,
        sorting = nyt,
        sortcites = false,
        language = american,
        abbreviate = false,
        backend = biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@BOOK{smith1965,
    AUTHOR = "John Smith",
    LOCATION = "London",
    NUMBER = "3",
    PART = "Part one",
    PUBLISHER = "Johnson Press",
    SERIES = "Classic books",
    TITLE = "A good book",  
    YEAR = "1965"}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\noindent
Text \parencite{smith1965}.
\printbibliography
\end{document}

enter image description here

share|improve this question
    
You should use volume="3",PART = "1", then you'll get in the output 3.1 –  Herbert Nov 19 '12 at 20:21
    
It's true it would give me the output 3.1, but volume is for multi-volume books, and not for specifying the volume number in a series. For that one should use number. Cf. the biblatex manual. –  Sverre Nov 20 '12 at 13:31

1 Answer 1

up vote 7 down vote accepted

BibLaTeX defines the directive to print the part as \DeclareFieldFormat{part}{.#1}

You can change it by

\DeclareFieldFormat{part}{#1}

The BibLaTeX manual specifies:

part field (literal)

The number of a partial volume. This field applies to books only, not to journals. It may be used when a logical volume consists of two or more physical ones. In this case the number of the logical volume goes in the volume field and the number of the part of that volume in the part field. See also volume.

Here is a redefinition of the printing directive that maintains consistency with BibLaTeX

\DeclareFieldFormat{part}{%
    \iffieldundef{volume}
        {#1}
        {.#1}%   
}
share|improve this answer
    
+1 for the redefinition. –  lockstep Nov 19 '12 at 20:01
    
Just to make sure I understand this. This says "If the entry has nothing in the field VOLUME, then print the field PART as is. If the entry does have something in the field VOLUME, then print the field PART with a period before it"? Do I put this in the preamble in my .tex file? –  Sverre Nov 19 '12 at 20:01
    
@Sverre Yes, your understanding is correct. Put it in the preamble. –  Guido Nov 19 '12 at 20:03
    
Thanks, that's a very useful approach, and works like a charm. –  Sverre Nov 19 '12 at 20:06

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.