Latex Bibliography Reference Going Off The Page

James picture James · Apr 24, 2017 · Viewed 9.8k times · Source

I have the following reference in my bibliography and the URL is going off of the side of the page. I am using the following package and need it on the page for printing margin guidlines:

\usepackage[style=authoryear]{biblatex}

Here is one of the offending references. I have tried a \\ but these end up as %5C in the URL. Please help.

@online{atlantichamburger,
    author    = "Libby Bawcombe",
    year      = "2014",
    title     = "The Hamburger Menu-Icon Debate",
    location  = "Washington",
    publisher = "The Atlantic",
    url       = "https://www.theatlantic.com/product/archive/2014/08/the-hamburger-menu-debate/379145/"
}

Answer

James picture James · Apr 24, 2017

I managed to fix this using the following link:

https://tex.stackexchange.com/questions/134191/line-breaks-of-long-urls-in-biblatex-bibliography

Essentially, you need to add:

\usepackage{url}

%%% --- The following two lines are what needs to be added --- %%%
\setcounter{biburllcpenalty}{7000}
\setcounter{biburlucpenalty}{8000}