12

The hyphenation in my bibliography is off somehow, I can't figure out why. Look:

\documentclass{scrreprt}  
\usepackage[style=alphabetic,hyperref=true]{biblatex} 
\bibliography{\jobname.bib} 
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@book{Fowler:2006,
    Address = {Boston},
    Author = {Fowler, Martin},
    Publisher = {Addison-Wesley},
    Title = {Patterns of Enterprise Application Architecture},
    Year = {2006}}

@book{Rotem-Gal-Oz:2012,
    Address = {Shelter Island, NY},
    Author = {{Rotem-Gal-Oz}, Arnon},
    Publisher = {Manning Publications Co.},
    Title = {SOA Patterns},
    Year = {2012}}
\end{filecontents}

\begin{document}
\nocite{Fowler:2006} \nocite{Rotem-Gal-Oz:2012}
\printbibliography
\end{document}

Now, when you compile that you can see that the "Addison-" of "Addison-Wesley" is too long. (I put in another Bib-Entry for your reference). Addison is to long.

I could fix this with Add\-ison but that's just weird. Also, I have more than one occurrence in my file and I dislike having to check for this error again and again.

So, what do I do now?

lockstep
  • 250,273
albifant
  • 307
  • 7
    LaTeX hyphenates words with hyphen only at the hyphen. You could use the command \hyphen offered by biblatex instead of the -. – Ulrike Fischer Jun 07 '13 at 11:50
  • In fact, I see the same issue with non-hyphenated words as well. Example: @book{Vossen:1996, Address = {Bonn}, Author = {Vossen, Gottfried AND Becker, J{\"o}rg.}, Isbn = {978-3826601248}, Keywords = {Gesch{\"a}ftsprozesse, Definitionen}, Publisher = In\-ter\-na\-tion\-al Thomson Publ., Title = {Gesch{\"a}ftsproze{\ss}modellierung und Work\-flow-Management. - Modelle, Methoden, Werkzeuge.}, Year = {1996}}

    The "Thomson" is not hyphenated correctly and too long. see: Picture of Thomson too long

    – albifant Jun 07 '13 at 12:18
  • 3
    The word Thomson is hyphenated correctly in the picture you've linked in the comment. You could try issuing the command \sloppy right before \printbibliography to let TeX find a different way to break lines. Alternatively, consider loading the package ragged2e and issuing the command \RaggedRight before \printbibliography. – Mico Jun 07 '13 at 12:27
  • @Mico \sloppy worked perfectly fine. I'll go with that, thank you. You might post that as an answer I can "accept". – albifant Jun 07 '13 at 12:58
  • 1
    See: http://tex.stackexchange.com/questions/109914/no-hyphens-in-biblatex/109917#109917 – Marco Daniel Jun 07 '13 at 13:05
  • since their paragraphs are so short, bibliographies are difficult to set fully justified, even with hyphenation enabled -- and enabling hyphenation is likely going to cause new problems, as bibliographies tend to contain a lot of odd words that TeX finds difficult to hyphenate (author names, cities, companies, publishers...). Is there a reason you can't just use \raggedright? – Nils L Jun 07 '13 at 13:21
  • @NilsL \raggedright would have the desired effect, yes. There is no real reason that would keep me from using it, except that I dislike having a bibliography that looks that much different from my text. So: Does it work - yes. Do I like it - sorry, no. :) – albifant Jun 07 '13 at 17:06
  • I'm voting to re-open this posting as it is not a duplicate of the earlier posting. Whereas the subject of the earlier posting was about how to go about suppressing hyphenation entirely while using biblatex, the present posting is about how to avoid overfull lines when LaTeX (not biblatex) is set not to hyphenate the component words in a hyphenated compound word. – Mico Aug 26 '20 at 17:42

1 Answers1

14

When dealing with material that's difficult to hyphenate, it can help at times -- but it's not guaranteed to work under all circumstances -- to provide the directive \sloppy. The \sloppy instruction lets TeX find line breaks by widening the amount of inter-word whitespace far more than is (normally) considered to be tolerable. However, do be sure to exhaust other possibilities before resorting to using \sloppy -- the results you may get with this method may look, well, sloppy!

Mico
  • 506,678
  • 3
    To be honest, I think this is a perfect solution for bibliographies. It might not help all the time but it did for me without exceptions. – phx Nov 01 '16 at 19:44
  • 3
    How do you cancel the effects of \sloppy when more sections follow the bibliography? – m000 Aug 26 '20 at 17:14
  • 2
    @m000 - \fussy. – Mico Aug 26 '20 at 17:43
  • 1
    how can I check whether \sloppy is still active? – Frederick Nord Nov 29 '21 at 14:15
  • @FrederickNord - Not sure if I understand your question. Are you asking if there's a TeX conditional that's set to "true" if \sloppy is in force? – Mico Nov 29 '21 at 18:23
  • 1
    I guess I care more about the typesetting result than about programmatically asking for the status. But yeah, a conditional would tell me, whether \sloppy has accidentally been left on. I guess it manipulates some internal settings which could be queried for. – Frederick Nord Dec 01 '21 at 12:36