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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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.
http://tex.stackexchange.com/questions/83395/biblatex-prints-white-space-plus-period-before-part-field
tex.stackexchange.com
crawl=CC-MAIN-2016-26
79288
application/http; msgtype=response
sha1:WEQAH4WHTHCHF4VUNNEQGAUAWMYWRRQB
<urn:uuid:e2ca63fa-7815-49db-8e1f-7ed2040c3bf0>
2016-06-29T12:40:28Z
151.101.65.69
sha1:2LHFJIRC4ZDNI54DJXMG74LA6FTZE25M
<urn:uuid:6b83ccdf-23a4-44ec-a821-624ee32d9329>
http://tex.stackexchange.com/questions/83395/biblatex-prints-white-space-plus-period-before-part-field
response
<urn:uuid:5681fa08-83ad-4ed9-a346-59c319699f0a>
robots: classic
hostname: ip-10-164-35-72.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2016-26
operator: CommonCrawl Admin
description: Wide crawl of the web for June 2016
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf