Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In my references (using XeLaTeX, biblatex and Biber) I have one specific DOI that is hanging over more than a centimeter after line-break.

All other DOI are correctly wrapped. Even inserting a (wrong space in the DOI does not help at all). How can I fix that?

I invoke biblatex using:

 \usepackage[safeinputenc,uniquelist=false,maxnames=2,%
             minnames=1,maxbibnames=99,style=authoryear,url=false,%
             dashed=false,firstinits=true,backend=biber]{biblatex}

and hyperref sign:

\usepackage[hidelinks,pdfa,pdfencoding=auto,pdfusetitle,hypertexnames=false]{hyperref}

This is what it looks like: enter image description here

P.S.: I know I can use: \setcounter{biburlnumpenalty}{100} but I'd prefer to perform a manual linebreak using some trick

share|improve this question
4  
Have ever thought about setting your bibliography with ragged right margin instead of justified? This would allow LaTeX to just put the whole DOI into a new line and as the bibliography is no continuous text it would be acceptable from a typographic point of view to do different than in the text itself. –  Benedikt Bauer Oct 14 '12 at 17:33
1  
@louiscypher The penalties were created to allow the user to change them. The default values at number and letters are high, so overfull boxes with these characters are common. –  Audrey Oct 15 '12 at 22:49
1  
@louiscypher: to do this just put the command that triggers the output of your bibliography into a group together with a \raggedright command: {\raggedright \printbibliography} –  Benedikt Bauer Oct 16 '12 at 8:44
1  
@louiscypher Breaks in name parts are controlled by the lownamepenalty and highnamepenalty counters. Details can be found in biblatex.def. These penalties default to no more than \hyphenpenalty, which is normally very low. None of the penalties are reset. For URLs definitions are hooked into \bibsetup and \citesetup. Other penalties are defined globally. –  Audrey Oct 30 '12 at 1:09
2  
@Audrey could you make this an answer? –  Stephan Lehmke Dec 2 '12 at 0:07

1 Answer 1

Audrey wrote the comment:


You can reset the break penalty for specific bibliography entries. Examples can be found here: Avoiding inelegant splits on URLs and Biblatex breakline Doi


Breaks in name parts are controlled by the lownamepenalty and highnamepenalty counters. Details can be found in biblatex.def. These penalties default to no more than \hyphenpenalty, which is normally very low. None of the penalties are reset. For URLs definitions are hooked into \bibsetup and \citesetup. Other penalties are defined globally.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.