6

I'm using the XeTeX with BibLaTeX and biber. That's the line:

\usepackage[backend=biber, citestyle=authoryear-ibid, bibstyle=authortitle-ibid]{biblatex} 

It's working fine but I'e just get one problem with one of the DOI as you can see. The "x" on the last line looks quite stupid. How can I avoid it?

Example of the problem

lockstep
  • 250,273
S12000
  • 1,239
  • 2
    Not a real solution to the problem, but a good workaround: use a short DOI: http://shortdoi.org/10.1046/j.1365-2648.1998.00768.x – matth May 06 '15 at 13:22

1 Answers1

8

"Stupid"-looking breaks in URLs are sometimes tough to avoid. From this post, you can see that the break penalty at a period (along with other symbols) is given by \UrlBreakPenalty. To avoid breaks at these symbols for a particular set of entries <key1,key2,...>, you can adapt a previous answer and add the following code to your preamble.

\DeclareBibliographyCategory{badbreaks}
\addtocategory{badbreaks}{<key1,key2,...>}

\AtEveryBibitem{%
  \ifcategory{badbreaks}
    {\mathchardef\UrlBreakPenalty=10000\relax}
    {}}

This will reset the break penalty locally from 200 to 10000 before printing any entry in the badbreaks category.

Audrey
  • 28,881