3

Somewhere between biblatex v3.0 and v3.7, biblatex (or perhaps the biber back-end) has started to remove ~ characters (i.e. non-breaking spaces) from certain fields (notably pages) in my bibliography entries.

For instance, the field Pages={article~1}, as it appears in my .bib file, gets turned into \field{pages}{article 1} in the resulting .bbl file (notice how the ~is gone), and because this turns up at the and of a line there is a line break between "article" and "1" in the final .pdf.

Does anyone know how I can keep this from happening?

Matthias
  • 4,051
  • 2
    Why do you use the pages field to store information other than page numbers or page ranges? – Paul Gaborit Jan 24 '17 at 21:28
  • 1
    I assume the pages field is parsed by Biber to allow for detection of all kinds of range indicators and such. You should probably not abuse it in such a way. There are other ways to store additional information. – moewe Jan 25 '17 at 07:31
  • @PaulGaborit & @moewe I guess you are both right. But this kind of "abuse" is fairly common in many bibtex exporting websites. I think the reason is more and more conference proceedings exist only digitally and editors don't bother numbering pages in favour of numbering the contained articles. I guess I could use an articleno field instead. But Biblatex doesn't seem to natively support that. – Matthias Jan 25 '17 at 08:44
  • It turns out @moewe already provided a solution for articleno support in Biblatex here. I'll go and try that now. – Matthias Jan 25 '17 at 08:47
  • 1
    It works. So then I guess this question can be closed. Although it may still be useful for other to know that the removing of ~ is something older Biblatex versions didn't do. – Matthias Jan 25 '17 at 10:32
  • It still is bad form to abuse the field in such a way even if the export tools of some web services tend to do such a thing (sometimes they do even more horrid things, I find that often manual adjustments are necessary to get proper output). Can you verify that older version of Biber didn't do such a thing and if so which versions? (I'd have thought that Biber has been doing parsing of the pages field for a really long time.) – moewe Jan 25 '17 at 11:20

1 Answers1

3

pages is a range field, the biblatex documentation says

Range fields consist of one or more ranges where all dashes are normalized and replaced by the command \bibrangedash. A range is something optionally followed by one or more dashes optionally followed by some non-dash (e.g. 5--7). Any number of consecutive dashes will only yield a single range dash. A typical example of a range field is the pages field.

So Biber has to actively parse the pages field. In the process of parsing it the ~ is removed.

Pages={article~1}

Is a malformed pages field anyway. I suspect you are looking for the eid field.

Of course you can start a feature request https://github.com/plk/biber/issues and ask Biber not to normalise the pages field.

moewe
  • 175,683