Biblatex bibliography and url line breaking

I just built a bibliography with biblatex and have the problem, that some urls in the bib are getting beyond the borders, so they are like too long or I don't know.

This is an example of what I mean, so you see, that for example the last 2 have the exact same borders (which should be obvious, of course), but the 3rd one has a url in it, that goes far above, and thats the same for some others.

How can I achieve, that this is not the case anymore, and there are linebreaks then?

• Please provide a minimal working example, so that other's can reproduce your problem and easily test possible solutions. Sep 4 '17 at 11:49
• See Heiko Oberdiek's answer to a similar question on this site. Sep 4 '17 at 11:50
• biblatex should handle this fine without doing anything special. Is the url in the url field of your bib entry? And is the format of the url field: \DeclareFieldFormat{url}{\url{#1}} (if you've modified it)? Sep 4 '17 at 12:15
• 'Beyond bonders', you say? Well, I never!
– cfr
Sep 5 '17 at 1:39

Try loading the url package and better yet combine it with the hyperref package. It might help to set the hyphens option, since by default, the url package does not consider hyphens as legal break points. (Quoted from this answer.)

\usepackage[hyphens]{url}
\usepackage{hyperref}

• Why 'better yet'? Not if you don't need hyperlinks as you're producing hard copy, say. Then it just adds complications to no purpose.
– cfr
Sep 5 '17 at 1:41
• I think hyperlinks are always a good thing to add. How often do you produce documents that are only intended for hardcopy these days? And what kind of complications do you expect to encounter anyway? Sep 5 '17 at 5:15
• Almost all my documents avoid hyperlinks in order to avoid complications. The exceptions are Beamer presentations. Most of the rest is intended as hardcopy or for paper-like electronic distribution. I've never seen a hyperlinked paper published in my field, for example, so anything intended for journal submission needs to not have them and most of my course materials are distributed as hard copy, so I don't want them in most teaching stuff either. hyperref introduces complications in terms of what's allowed in what.
– cfr
Sep 5 '17 at 11:05
• @cfr "I've never seen a hyperlinked paper published in my field,..." That's interesting. May I ask what field that is? I come from high-energy physics where it's the norm. For instance, APS uses hyperlinks for author emails, equation, figure and section references, tocs, urls, etc. in all of their publications, i.e. Physical Review A, B, C, D and Letters. Sep 5 '17 at 11:13
• @cfr "hyperref introduces complications in terms of what's allowed in what." Can't remember the last time I've had problems with it and I've been using it for years in everything ranging from published articles and reviews to notes and documentation. It worked flawlessly in every setting and does a great of job of helping the reader focus on reading rather than hunting down references. Also, you don't have to write out long ugly URL. A simple "click here" does the trick. Sep 5 '17 at 11:16

This question still really needs a MWE to be absolutely sure what is going on, but here at least is an example that gives the output you want.

I have used the addendum field for Interview mit Daniel Grieder, CEO von Tommy Hilfiger because this is the only suitable field that will be printed after the url field in the standard styles.

Note: You have spelt Hilfiger wrong in your screenshot.

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage[style=authoryear]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@online{Pittroff2015,
author = {Pittroff, Uschka and Grieder, Daniel},
date = {2015},
url = {http://www.manager-magazin.de/lifestyle/mode/mode-tommy-hilfiger-stellt-auf-digitalen-showroom-um-a-1014348.html},
addendum = {Interview mit Daniel Grieder, CEO von Tommy Hilfiger}
}
\end{filecontents}
\pagestyle{empty}
\urlstyle{same}
\DeclareFieldFormat{url}{\url{#1}}
\begin{document}
\nocite{*}
\printbibliography
\end{document}


• Spelling doesn't appear to be the OP's strong point .... (Not that I should talk.)
– cfr
Sep 5 '17 at 1:41
• If you're using Biblatex, redeclaring the field format to cope with URLs is rather pointless, isn't it? URLs are handled out-of-the-box, whether active or not. You may need to adjust where URLs are allowed to break, but / and - are default, aren't they?
– cfr
Sep 5 '17 at 1:44
• The default is \DeclareFieldFormat{url}{\mkbibacro{URL}\addcolon\space\url{#1}} so your redeclaration will just mess up the format. (Unless, of course, you want to remove the formatting.) Something else is going on the OP's code, which we don't, of course, have any way of finding.
– cfr
Sep 5 '17 at 1:46
• The OP example does not include ᴜʀʟ: (produced by \mkbibacro{URL}\addcolon\space), so I took it out. Sep 5 '17 at 1:49
• @cfr, yes something else is going on. I suspect the OP has DeclareFieldFormat{url}{#1} which removes the possibility for the url to be broken. Sep 5 '17 at 1:50