# biblatex backref – how to add spaces around the dash?

I am using biblatex with backref=true, which generates ranges as e.g. 34–37. How can I make it e.g. 34 – 37? The spaces should be non-breakable.

I have tried to redefine \bibrangedash, but with no success.

-
Please be a bit more specific about how you attempted to redefine \bibrangedash. Did you try, say, \def\bibrangedash{\mbox{\,--}\,}? (The \mbox instruction is there to prevent a line break right before the endash.) –  Mico Apr 29 '12 at 12:26
@Mico I tried \renewcommand*{\bibrangedash}{\,~\textendash~\,} and other variants, but neither those nor the one you have provided work. Anyway, I had another look at the documentation and I missed an important information, my apologies. The answer is coming. –  Harold Cavendish Apr 29 '12 at 12:39

Although the OP's question is about adding non-breakable spaces, I suggest a solution differing in two respects:

• As an en-dash surrounded by (full) spaces denotes the start/end of an insertion rather than a range, I'd use thin spaces instead.

• Because "line-breaking in the bibliography is often more difficult than in the body text and [...] you can not resort to rephrasing a sentence" (biblatex manual, section 3.8.4), the space following the en-dash should be associated with a high, but finite (for TeX, i.e., <10,000) penalty rather than unbreakable.

The corresponding biblatex commands are \addnbthinspace and \addhpthinspace. See section 4.7.4 of the manual for details.

\DefineBibliographyExtras{english}{
}

-
Thank you, I shall accept your answer as it is probably relevant to more languages. I am using normal spaces because of the style requirements I have to meet. –  Harold Cavendish Apr 29 '12 at 16:53

I was inattentive and misinterpreted a bit of the documentation. The following works, should someone need the same:

\DefineBibliographyExtras{english}{
\renewcommand*{\bibrangedash}{~\textendash~}
}

-
Do you need both the thinspace (\,) and the regular (unbreakable) interword space (~) spacers? I'd think that one or the other spacer would suffice. –  Mico Apr 29 '12 at 13:00
@Mico You are correct, thank you. I used your example and left them there. I need a vacation. :-/ –  Harold Cavendish Apr 29 '12 at 13:16