# Editing the bibliography without changing citations in the text

Preparing my manuscript for publication, I need to manually redact the bibliography I generated with biblatex (style authortitle-dw) and Biber. This is mostly about fixing the line and page breaks (some nasty URLs, making sure that bib items do not break across pages, etc., see pictures below). I cannot make these fixes in the *.bbl file since the changes there would also affect the citations in the text. Any ideas how to do that?

-
Do you need the URLs in the bibliography? You can use the option url=false to the biblatex package to turn them off altogether. –  qubyte Feb 18 '12 at 11:57
Thanks for tip, I didn't know that one. I need the URLs, though. In fact, you might say that I need to have total control over the typesetting of the bibliography. I have to deliver a camera-ready PDF and for high quality publications you cannot rely on automatically generated line and page breaks. –  Till A. Heilmann Feb 18 '12 at 12:03
Take a look at my answer. There are a number of counters that control the behaviour that you need to alter. –  qubyte Feb 18 '12 at 12:11
what about this discussion on how to get a new line for url, doi and so on: tex.stackexchange.com/questions/29802/… –  pluton Feb 20 '12 at 0:03

I can't see if this will work without your bibliography and code, but setting the following counters to a number greater than 0 (but less than 10,000) should allow URLs to break across lines.

\setcounter{biburlnumpenalty}{9000}
\setcounter{biburlucpenalty}{9000}
\setcounter{biburllcpenalty}{9000}

The higher the numbers, the less allowed line breaks will be. There are similar counters with similar properties for things other than URLs. See Section 4.10.3 of the biblatex manual.

-
Thanks for the hint. However, I don't see how the lengths and counters discussed in 3.8.3 and 4.10.3 of the biblatex manual would allow me to control the page breaks in the bibliography. Maybe the way to go is to typeset the document for correct appearance of the in-text citations first, keep the generated PDF, then typeset the document with manual changes in the *.bbl to generate a polished bibliography and finally join the "correct" parts of the two PDFs. Cumbersome, but it's the result that counts. –  Till A. Heilmann Feb 18 '12 at 12:25
I'm not sure I understand. Did you try these three lines (with high numbers)? How large are these bibliography entries if page breaks are becoming a real issue? If you want more specific advice on your question, then I recommend posting a picture of the kind of problems you're seeing. –  qubyte Feb 18 '12 at 12:29
Ok, I've uploaded the bibliography to http://tillheilmann.info/bibliography.pdf. Problematic URLs are on pp. 257, 259 and 269. But there are also many problems with other line breaks (pp. 262, 264, 268, 271) and, more critically, with page breaks (pp. 257/8, 259/60, 260/1, 261/2 ...) –  Till A. Heilmann Feb 18 '12 at 12:43
You could really use some formatting in these entries. What style are you using? Just so that isn't only for me, I urge you to take a screen shot of one or two of these isses, crop them and then put the resultant images into the question itself. Sorry, I should have been clearer on this point. –  qubyte Feb 18 '12 at 12:53
@MarkS.Everitt Those are penalties for the linebreaks at specific characters in URLs. So any number between 1 and 9999 will allow linebreaks, but the higher the penalty the less likely a linebreak. Bad linebreaks in URLs can selectively be sorted out by resetting the penalties locally. –  Audrey Feb 18 '12 at 15:46
show 1 more comment

To make sure that bibliography items do not break across pages, change the definition of \bibsetup so that \interlinepenalty is set to 10000 instead of 5000.

\patchcmd{\bibsetup}{\interlinepenalty=5000}{\interlinepenalty=10000}{}{}

Here's the original definition from biblatex.def:

\newcommand*{\bibsetup}{%
\interlinepenalty=5000\relax
\widowpenalty=10000\relax
\clubpenalty=10000\relax
\raggedbottom
\frenchspacing
\biburlsetup}
-
Thanks, that solves part of my problem. Is there a way of allowing bib items to break from an even (left) to an odd (right) page but not the other way around? That's why I said I needed to have total control over the page breaks in an earlier comment, because you really have to decide case by case and usually cannot leave that to an algorithm. –  Till A. Heilmann Feb 18 '12 at 13:26
@TillA.Heilmann None that I know of. –  lockstep Feb 18 '12 at 13:27

I have used

\sloppy
\fussy

before to deal with bad line breaks in the bibliography. That sometimes gives very wide spaces between words, but it was good enough for me. YMMV.

-