1

I would like long URLs in Bibliography to be ragged-right (left aligned) and start on a new line if longer than one line. There should be no way there is https: alone or after text at the end of line and the URL is continuing on the next line.

I have tried this solution, but it doesn't work: https://tex.stackexchange.com/a/15655/106367

Ragged right not working: Bad URL linkebreaks in bibliography

Bibliography setup

%% The following section sets up the bibliography.
\usepackage{csquotes}
\usepackage[
  backend=biber,
  style=numeric,
  citestyle=numeric-comp,
  sorting=none,
  sortlocale=auto,
  urldate=iso8601,   %% US date formatting
  date=iso8601,
]{biblatex}

\setlength{\bibitemsep}{\baselineskip} %% Add empty space between bibliography entries
\usepackage{url} %% Add package to handle URL

Print Bibliography

\begingroup
\tolerance=300
\emergencystretch=1em
\raggedright
\sloppy
\printbibliography[heading=bibintoc] %% Print the bibliography.
\endgroup
  • Try http://tex.stackexchange.com/questions/308304/how-to-avoid-linebreak-at-http-in-url/308308#308308. Untested as you didn't provide a complete example. – Ulrike Fischer May 24 '16 at 11:19

1 Answers1

2

If you want urls to be split at any uppercase or lowercase letter, try this (from Heiko Oberdiek) in your preamble:

\setcounter{biburllcpenalty}{7000}
\setcounter{biburlucpenalty}{8000}
Bernard
  • 271,350