# Biblatex's textcite inserts a breaking space between author names and citation number

I have the following document :

\documentclass{article}
\usepackage[backend=biber,style=numeric,maxnames=2,maxbibnames=6,firstinits]{biblatex}
\bibliography{sample}

\begin{document}
Here we want to generate a long sentence so the citation will split \textcite{fictive}.
\printbibliography
\end{document}


with corresponding bib file :

@article{fictive,
author = {John Doe and John Smith and John Carpenter and John McCain},
year = 2012,
title = {Super awesome paper},
journal = {Super awesome journal}}


The rendering of this document is such :

Here we want to generate a long sentence so the citation will split Doe et al.
[1].


With the line break exactly at the same place. This doesn't feel right. I would prefer the following, i.e. having a non-breaking space instead of a breaking space between authors and citation number :

Here we want to generate a long sentence so the citation will split Doe
et al. [1].


Writing it textually in a tex file :

Doe et al.~[1]


Anyone else agree that this is the right way to do it? How do I go about changing this?

-

The biblatex command \addnbspace is a non-breakable variant of \addspace. You can swap these commands in the textcite bibliography macro defined in numeric.cbx. This can easily be done by adding the following to your preamble.

\usepackage{xpatch}


The patch will also work for the numeric-comp and numeric-verb styles.

In your MWE this induces a linebreak in "et al." To avoid this, you can increase the penalty in breaking at \addabbrvspace - the space used in abbreviated localization strings. In biblatex.def this penalty is assigned the value:

\defcounter{abbrvpenalty}{\hyphenpenalty}


which defaults to 50. You can increase the penalty at the risk of some overfull boxes with, say:

\defcounter{abbrvpenalty}{9000}


or:

\xpretobibmacro{textcite}{\defcounter{abbrvpenalty}{9000}}{}{}


Values at or above 10000 will make \addabbrvspace non-breakable.

-
+1, not only for xpatch. ;-) –  egreg Oct 1 '12 at 20:43
@egreg Thanks. Any plans on extending the patch commands to formatting directives? –  Audrey Oct 1 '12 at 20:58
Which family of commands are they? –  egreg Oct 1 '12 at 21:00
@egreg For fields the CS names go by: abx@ffd@<entrytype>@<format>. Default formats use * instead of entrytype. Names and lists are similar, but with nfd and lfd instead of ffd. Indexing directives use fid, nid, lid. –  Audrey Oct 1 '12 at 21:07
+1 but this does show the trade off. If you introduce too many non-breaking spaces in a bibliography driver it can be really tough to deal with overfull boxes, because it's nearly impossible to clean up by hand. It may be easier to live with the odd less-than-perfect break. Would adding a high penalty space rather than an unbreakable space be a possible compromise? –  Paul Stanley Oct 1 '12 at 21:12