8

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

Marco Daniel
  • 95,681
louis cypher
  • 1,333
  • I have to point out that the linebreaks in my bibliography are not clean at all. Even in the author field. – louis cypher Oct 14 '12 at 15:36
  • 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
  • You can reset the break penalty for specific bibliography entries. Examples can be found here: http://tex.stackexchange.com/a/30863/4483 and http://tex.stackexchange.com/a/51139/4483 – Audrey Oct 15 '12 at 15:08
  • @Benedikt . Nice Idea! How do I set the justification of the bibliography. Changing the maring of komascript or by biblatex parameters? – louis cypher Oct 15 '12 at 22:04
  • @Audrey I dislike to change parameters since my guess is that the person who set them has had a reason to change them and things have rarely improved when I changed default setting. Thus, I'd prefer to add hard linebreaks. – louis cypher Oct 15 '12 at 22:06
  • 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 08:44
  • @Audrey Works fine for urls. But what is the name of the penalties used for names? I cannot find anything in the documentation that works (tested high/lownamepenalty). BTW: are these values reset in new referencesections? – louis cypher Oct 29 '12 at 20:33
  • 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 01:09
  • 2
    @Audrey could you make this an answer? – Stephan Lehmke Dec 02 '12 at 00:07
  • Workaround: Use a short DOI: http://shortdoi.org/10.1108/01439910810876427 – matth May 06 '15 at 13:26

1 Answers1

2

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.

Marco Daniel
  • 95,681