9

I have long URLs in my references and I want to submit my paper to arxiv.org.

They use TexLive 2016.

I tried to follow advice at

Line breaks of long URLs in biblatex bibliography?

URLs in bibliography: LaTeX not breaking line as expected

to no avail. Interestingly, arxiv.org expects .bbl file, not the .bib file.

I tried to manually insert '\-' hyphenation into the .bbl file but that didn't work.

How can I break long URLs on arxiv.org?

Gergely
  • 1,065
  • 1
  • 8
  • 17

3 Answers3

9

At last

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

did the trick.

Gergely
  • 1,065
  • 1
  • 8
  • 17
4

After a lot of experimenting I found that the following works:

\usepackage{biblatex}
\usepackage{hyperref}
\usepackage{xurl}
\hypersetup{breaklinks=true}

Packages must be in this order. The biblatex might not be necessary, but I suppose you are using it anyway.


The problem seems to come up from here and Overleaf has a relevant lemma. Although these links might provide little insight as to why links can't break on arXiv, the reason has to do with how their HyperTeX is setup to work.

Jim
  • 535
1

Same answer as Gergely's but without the hyphen option for url

\usepackage{url}
\usepackage{hyperref}
\usepackage[hyphenbreaks]{breakurl}
janeon
  • 11