TransWikia.com

biblatex: If comma-separated organizational unit names as publisher are braced individually, most disappear — why?

TeX - LaTeX Asked by user570286 on July 26, 2021

Suppose I, using biblatex, want to cite a publication of a government office and include the names of its parent agencies as the publisher, as in, e.g., APA style. Suppose these agency names include the word "and". Per the biblatex manual, §2.3.4, if a publisher’s name contains the word "and", either the "and" or the whole name must be braced to escape the "and" from being interpreted as a list separator. Either bracing the "and"s or (double-)bracing the whole publisher values does work. However, if I brace the names of the individual organizational units within the publisher field, the output seems strange — the first organizational unit is shown as the publisher, but the succeeding ones are omitted.

The following example document demonstrates by creating a reference list in which a publisher field is given with bracing of the "and"s, with bracing of the whole value, and with bracing of the names of the individual organizational units. This is demonstrated with both the book and the misc entry types (the latter using organization rather than publisher).

documentclass{article}

usepackage{biblatex}

begin{filecontents}[overwrite]{jobname.bib}
@book{book1,
    title={Book 1},
    author={A.},
    date={2013},
    publisher={Republic of Foo {and} Bar, Ministry of Education {and} Science, Office for Food {and} Agriculture},
}
@book{book2,
    title={Book 2},
    author={A.},
    date={2013},
    publisher={{Republic of Foo and Bar, Ministry of Education and Science, Office for Food and Agriculture}},
}
@book{book3,
    title={Book 3},
    author={A.},
    date={2013},
    publisher={{Republic of Foo and Bar}, {Ministry of Education and Science}, {Office for Food and Agriculture}},
}
@misc{misc1,
    title={Misc 1},
    author={A.},
    date={2013},
    organization={Republic of Foo {and} Bar, Ministry of Education {and} Science, Office for Food {and} Agriculture},
}
@misc{misc2,
    title={Misc 2},
    author={A.},
    date={2013},
    organization={{Republic of Foo and Bar, Ministry of Education and Science, Office for Food and Agriculture}},
}
@misc{misc3,
    title={Misc 3},
    author={A.},
    date={2013},
    organization={{Republic of Foo and Bar}, {Ministry of Education and Science}, {Office for Food and Agriculture}},
}
end{filecontents}
addbibresource{jobname.bib}

begin{document}

nocite{*}
printbibliography[]

end{document}

Note that the publisher (and organization) fields are given in the following forms:

  1. publisher={A {and} B, C {and} D, E {and} F},
  2. publisher={{A and B, C and D, E and F}}, and
  3. publisher={{A and B}, {C and D}, {E and F}}.

This is the result (formatted as well as a code block allows):

References

[1] A. Book 1. Republic of Foo and Bar, Ministry of Education and Science,
    Office for Food and Agriculture, 2013.
[2] A. Book 2. Republic of Foo and Bar, Ministry of Education and Science,
    Office for Food and Agriculture, 2013.
[3] A. Book 3. Republic of Foo and Bar, 2013.
[4] A. Misc 1. Republic of Foo and Bar, Ministry of Education and Science,
    Office for Food and Agriculture, 2013.
[5] A. Misc 2. Republic of Foo and Bar, Ministry of Education and Science,
    Office for Food and Agriculture, 2013.
[6] A. Misc 3. Republic of Foo and Bar, 2013

Note that, where the form publisher={{A and B}, {C and D}, {E and F}} was used, everything after and including the first comma disappeared. My questions are:

  1. Why? What does publisher={{A}, {B}, {C}} mean to biblatex that I’m not realizing?
  2. Where should I have found that in the biblatex manual?

2 Answers

At the moment this looks like a Biber bug to me, so I reported the issue at https://github.com/plk/biber/issues/370.

In the following example

documentclass[british]{article}
usepackage[T1]{fontenc}
usepackage{babel}
usepackage{csquotes}

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

begin{filecontents}{jobname.bib}
@book{book1,
  title     = {Book 1},
  author    = {A.},
  date      = {2011},
  publisher = {A {and} B, C {and} D, E {and} F},
}
@book{book2,
  title     = {Book 2},
  author    = {A.},
  date      = {2012},
  publisher = {{A and B, C and D, E and F}},
}
@book{book3,
  title     = {Book 3},
  author    = {A.},
  date      = {2013},
  publisher = {{A and B}, {C and D}, {E and F}},
}
@book{compare,
  title     = {Compare},
  author    = {Z},
  date      = {2014},
  publisher = {X and Y and Z},
}
@book{bookc1,
  title     = {Book C 1},
  author    = {Z},
  date      = {2011},
  publisher = {A {and} B and C {and} D and E {and} F},
}
@book{bookc2,
  title     = {Book C 2},
  author    = {Z},
  date      = {2012},
  publisher = {{A and B and C and D and E and F}},
}
@book{bookc3,
  title     = {Book C 3},
  author    = {Z},
  date      = {2013},
  publisher = {{A and B} and {C and D} and {E and F}},
}
end{filecontents}
addbibresource{jobname.bib}

begin{document}
nocite{*}

printbibliography
end{document}

the .bbl file contains (abridged)

% book1
      list{publisher}{1}{%
        {A {and} B, C {and} D, E {and} F}%
      }
% book2
      list{publisher}{1}{%
        {A and B, C and D, E and F}%
      }
% book3
      list{publisher}{1}{%
        {A and B}, {C and D}, {E and F}%
      }

where I would have expected

      list{publisher}{1}{%
        {{A and B}, {C and D}, {E and F}}%
      }

for book3 instead.

The problem here is that biblatex uses the outer braces to iterate over the list, so for biblatex

      list{publisher}{1}{%
        {A and B}, {C and D}, {E and F}%
      }

looks more like a list with three entries, which would appear in the .bbl as

  list{publisher}{3}{%
    {X}%
    {Y}%
    {Z}%
  }

Ultimately, the missing braces in make biblatex only grab the first bit A and B as content of the list.

Correct answer by moewe on July 26, 2021

The problem is, you have to treat lists of things as names of lists, mostly. That means, elements must be separated by and, what you did not do. The following code gives the expected result and changes the separator for the last list element into "&" for better visualization:

documentclass{article}

usepackage{biblatex}
renewcommand*{multilistdelim}{addcommaaddspace}
renewcommand*{finallistdelim}{addspace&addspace}

begin{filecontents}[overwrite]{jobname.bib}
@book{book3,
    title={Book 3},
    author={A.},
    date={2013},
    publisher={{Republic of Foo and Bar} and {Ministry of Education and Science} and {Office for Food and Agriculture}},
}
end{filecontents}
addbibresource{jobname.bib}

begin{document}

nocite{*}
printbibliography[]

end{document}

Answered by Manuel Weinkauf on July 26, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP