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.

I'm preparing my bibliography and noticed that biblatex-printbibliography produces Overfull \hbox several times.

Examples (gray lines indicates text margins, red line is the physical page margin):

First Example

Third example

Second Example

Why is hyperref line-breaking not working as expected using pdflatex or even latex -> dvipdfm BUT not using latex -> dvips -> ps2pdf?

Also it would be great if someone could point out how I can raise the indentation of the second (and following) lines, as this might look better.

edit: Customized question, as the answer given by lockstep solved the third problem. The second problem seems to be identical to the first.

\documentclass[12pt]{scrbook}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ps2pdf]{hyperref}
%\usepackage[ps2pdf,breaklinks=true]{hyperref} %This doesn't change anything.
%\usepackage{breakurl} %That makes no difference either.

\usepackage[a4paper,twoside,showframe]{geometry} %show text margins

\usepackage[style=alphabetic,backend=biber,maxnames=4,minnames=3,maxbibnames=99]{biblatex}
\bibliography{biblatex-issue}

\begin{document}
\nocite{*}

\printbibliography[heading=subbibliography,type=article,prefixnumbers={A-}]
\printbibliography[heading=subbibliography,type=book,prefixnumbers={B-}]
\printbibliography[heading=subbibliography,type=online]

\end{document}

And the bib-file:

@online{GLS:datasheet,
    title         = "GLS Datasheet",
    organization  = "Optoelectronics Research Centre",
    howpublished ="Website",
    date = "2004-09",
    urldate="2013-07-01",
    url ="http://www.southampton.XXXX",
    address       = "Southampton, United Kingdom"
}
@book {Lifante:Fundamentals,
    title = "Integrated Photonics: Fundamentals",
    author = "Lifante, Ginés",
    publisher = "J.Wiley",
    address = "Chichester",
    year = "2003",
    type = "text",
    isbn = "9780470848685"
}
@article{Labadie:First_fringes,
    author = {Labadie, L. and Mart\'{\i}n, G. and Anheier, N. C. and Arezki, B. and Qiao, H. A. and Bernacki, B. and Kern, P.},
    title = {First fringes with an integrated-optics beam combiner at 10},
    DOI= "10.1051/0004-6361/201116727",
    journal = {A\&A},
    year = 2011,
    volume = 531,
    pages = "A48"
}

P.S.: I noticed that the visiting-date of the GLS-datasheet is wrong ;-)

share|improve this question
    
It would be great if you could provide a complete MWE. –  mafp Apr 8 '13 at 10:15
    
I removed the boxes tag because it isn't used for questions about "bad" linebreaks. –  lockstep Apr 8 '13 at 10:15
    
I haven't put that flag in..hmm... Added MWE. Problem for the URL disappeared somehow, don't know why. –  DL6ER Apr 8 '13 at 10:27
    
Rather than adding links, please include the .tex and .bib files directly in the question (as code samples). –  lockstep Apr 8 '13 at 10:32
    
The first and the second problem can be avoided when removing hyperref (that is not a good solution). Although the third problem (Wiley leaking out of the margin) still remains. –  DL6ER Apr 8 '13 at 10:39

2 Answers 2

The first and second problem could be solved by removing the ps2pdf package option and running your example in PDF mode (see my picture) -- but that may not be an option for you. With regard to the third problem, an unbreakable space is missing in J.Wiley -- with J.~Wiley, a hyphen will be added after the i and the line break becomes acceptable.

\documentclass[12pt]{scrbook}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}

\usepackage[a4paper,twoside,showframe]{geometry}

\usepackage[style=alphabetic,backend=biber,maxnames=4,minnames=3,maxbibnames=99]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@online{GLS:datasheet,
    title         = "GLS Datasheet",
    organization  = "Optoelectronics Research Centre",
    howpublished ="Website",
    date = "2004-09",
    urldate="2013-07-01",
    url ="http://www.southampton.XXXX",
    address       = "Southampton, United Kingdom"
}
@book {Lifante:Fundamentals,
    title = "Integrated Photonics: Fundamentals",
    author = "Lifante, Ginés",
    publisher = "J.~Wiley",
    address = "Chichester",
    year = "2003",
    type = "text",
    isbn = "9780470848685"
}
@article{Labadie:First_fringes,
    author = {Labadie, L. and Mart\'{\i}n, G. and Anheier, N. C. and Arezki, B. and Qiao, H. A. and Bernacki, B. and Kern, P.},
    title = {First fringes with an integrated-optics beam combiner at 10},
    DOI= "10.1051/0004-6361/201116727",
    journal = {A\&A},
    year = 2011,
    volume = 531,
    pages = "A48"
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography[heading=subbibliography,type=article,prefixnumbers={A-}]
\printbibliography[heading=subbibliography,type=book,prefixnumbers={B-}]
\printbibliography[heading=subbibliography,type=online]

\end{document}

enter image description here

An alternative is to allow for some "emergency" extra space:

\appto{\bibsetup}{\emergencystretch=1em}

enter image description here

share|improve this answer
    
The unbreakable space helped solving the third problem, just like you mentioned, but removing the [ps2pdf] changed nothing (so 1st still remains). I can't use pdflatex, as I am heavily operating with pstricks and pdflatex makes that very hard. So I'm always going latex -> dvips -> ps2pdf (of course sometimes I'm using biber after latex). –  DL6ER Apr 8 '13 at 11:01
    
@DL6ER In that case, have a look at tex.stackexchange.com/questions/20768/… –  lockstep Apr 8 '13 at 11:05
    
Already seen that, but neither using \usepackage[breaklinks=true]{hyperref} nor adding \usepackage{breakurl} after hyperref solves the first problem. –  DL6ER Apr 8 '13 at 11:09
    
@DL6ER Too bad. As I know next to nothing about DVI mode, I suggest you update your question, specifically pointing out the issue my answer didn't solve. That way (and by adding the dvips tag), it is more likely to attract a suitable expert. –  lockstep Apr 8 '13 at 11:12
    
Really strange: latex + dvipdfm is working as expected, while latex -> dvips -> ps2pdf fails. Hope someone can tell how to fix this. –  DL6ER Apr 8 '13 at 11:29
up vote 4 down vote accepted

I will answer to my own question as I finally found a solution, that might be of interest to all the ones having problems with displaying long URLs in LaTeX and also to show you the effect: I had a little chat with Vilar (the maintainer of the breakurl-package) and he was able to extend the breaking possibilities of his package they way I suggested.

Therefore the new option anythingbreaks in the newest version does the links look good as they keep in range of the textborder.


See for yourself:

Completely without:

without


Standard behavior:

breakurl


Anythingbreaks:

option anythingbreaks


@lockstep: Thanks for your solution regarding the third problem. Really have missed the ~.

share|improve this answer
    
+1 Thanks for your reply. Good know. –  Marco Daniel Apr 10 '13 at 20:32

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.