# \usepackage[hyphenbreaks]{breakurl} not working in \footnote or appendix

I am using the package breakurl to avoid the urls to be out of the document. I am using TexMaker under GNU/Linux (concretely Debian wheezy), and generating a PDF file. The package works quite well except in two cases:

In the first case, the call to the \burl command is in a \footnote, in the second one, in a list in an appendix. The problem seems to be with the issue of hyphens not being interpreted as break points. I followed the instructions at http://texdoc.net/texmf-dist/doc/latex/breakurl/breakurl.pdf and try with the option \usepackage[hyphenbreaks]{breakurl}, but it does not work. I also tried the option hyphenbreaks, but it doesn't work neither (and it breaks the format in other places). Do you have any idea why this could be happening?

Thank you very much,

David

P.S: Here is a Minimum Working Example, as suggested by @Mico:

\documentclass[a4paper,12pt]{report}
\usepackage[margin=2.5cm]{geometry}
\usepackage[british]{babel}
\usepackage[utf8]{inputenc}

\usepackage[usenames,dvipsnames]{color}
\usepackage{setspace}
\usepackage{titlepic}
\usepackage{graphicx}
\usepackage[nodayofweek]{datetime}
\usepackage{float}
\usepackage{booktabs}
\usepackage{tablefootnote}
\usepackage{multirow}

\usepackage{titlesec}
\setcounter{secnumdepth}{4}
\titleformat{\paragraph}
{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titlespacing*{\paragraph}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}

\usepackage{csquotes}

\usepackage[style=apa, backend=biber]{biblatex}
\DeclareLanguageMapping{british}{british-apa}

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

\usepackage[super]{nth}
\usepackage[gen]{eurosym}

\begin{document}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis commodo leo quis gravida tempor. Suspendisse convallis nibh in nisl ultrices porttitor. Etiam mattis mauris eget lectus ultricies, ut laoreet leo aliquet. Sed justo quam, ornare nec ex eget, consequat feugiat purus. Donec ultricies metus quis fermentum feugiat. Proin vehicula eu ex vel laoreet. Nullam nec dictum ante\footnote{\label{footnote-dcne2014} \url{http://camp.drupalne.org/session/drupal-case-commons-based-peer-production}} \footnote{\url{https://amsterdam2014.drupal.org/bof/study-drupal-community-academia-what-has-been-said-and-what-can-we-learn}}.

\newpage
%% Appendixes
\appendix

\chapter{List of modules, published materials and presentations}

\begin{itemize}
\item Presentations:
\begin{itemize}
\item Drupal as a case of Commons-based Peer Production", DrupalCamp North East (Sunderland, 25/07/2014 - \url{http://camp.drupalne.org/session/drupal-case-commons-based-peer-production}). Slides available at \url{http://www.slideshare.net/drozas/drupal-cbpp-dcne14}
\end{itemize}
\end{itemize}

\end{document}


P.S.2: Here is the MWE with the changes suggested by @egreg. In this case, there seems to be a clash with the packages: ! LaTeX Error: Option clash for package url.

\documentclass[a4paper,12pt]{report}
\usepackage[margin=2.5cm]{geometry}
\usepackage[british]{babel}
\usepackage[utf8]{inputenc}

\usepackage[usenames,dvipsnames]{color}
\usepackage{setspace}
\usepackage{titlepic}
\usepackage{graphicx}
\usepackage[nodayofweek]{datetime}
\usepackage{float}
\usepackage{booktabs}
\usepackage{tablefootnote}
\usepackage{multirow}

\usepackage{titlesec}
\setcounter{secnumdepth}{4}
\titleformat{\paragraph}
{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titlespacing*{\paragraph}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}

\usepackage{csquotes}

\usepackage[style=apa, backend=biber]{biblatex}
\DeclareLanguageMapping{british}{british-apa}

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

%\usepackage[hyphenbreaks]{breakurl}

\usepackage[super]{nth}
\usepackage[gen]{eurosym}

\begin{document}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis commodo leo quis gravida tempor. Suspendisse convallis nibh in nisl ultrices porttitor. Etiam mattis mauris eget lectus ultricies, ut laoreet leo aliquet. Sed justo quam, ornare nec ex eget, consequat feugiat purus. Donec ultricies metus quis fermentum feugiat. Proin vehicula eu ex vel laoreet. Nullam nec dictum ante\footnote{\label{footnote-dcne2014} \url{http://camp.drupalne.org/session/drupal-case-commons-based-peer-production}} \footnote{\url{https://amsterdam2014.drupal.org/bof/study-drupal-community-academia-what-has-been-said-and-what-can-we-learn}}.

\newpage
%% Appendixes
\appendix

\chapter{List of modules, published materials and presentations}

\begin{itemize}
\item Presentations:
\begin{itemize}
\item Drupal as a case of Commons-based Peer Production", DrupalCamp North East (Sunderland, 25/07/2014 - \url{http://camp.drupalne.org/session/drupal-case-commons-based-peer-production}). Slides available at \url{http://www.slideshare.net/drozas/drupal-cbpp-dcne14}
\end{itemize}
\end{itemize}

\end{document}

• Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Nov 17, 2014 at 11:59
• Insteading of using the breakurl package, you might try loading the url package with the option hyphens: \usepackage[hyphens]{url}. This is a failsafe method of typesetting long URL strings that may contain hyphens.
– Mico
Nov 17, 2014 at 13:15
• You really need to post a Minimum Working Example, i.e., a document that starts with \documentclass and ends with \end{document} that replicates the problem behavior you're looking to fix. One or two footnotes with long URLs and one or two \items with long URLs should do it for the body of the document. It's crucial that you further indicate which TeX distribution you employ, which document class you use, as well as information about special fonts (if any), special formatting requirements (if any), and so on.
– Mico
Nov 17, 2014 at 20:48
• Thanks for your suggestion @Mico! I have added a MWE in the main messsage. Nov 19, 2014 at 9:45

The first thing to note is that breakurl is useful only if the document is processed with latex+dvips+ps2pdf in order to produce a PDF file. If pdflatex is used, there's no point in loading breakurl instead of url.

Second: the package hyperref requires url, so this package should be loaded before hyperref if we want to add options to it.

Third: also biblatex requires url; so, again, url must be called before biblatex if options are to be passed to it.

Fourth: biblatex, for unknown reasons, changes the default URL style.

Here's the minimal example which you can base your document on:

\documentclass[a4paper,12pt]{report}

\usepackage[hyphens]{url}
\usepackage[style=apa, backend=biber]{biblatex}
\usepackage{hyperref}

\urlstyle{tt}

\begin{document}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis commodo leo quis gravida
tempor. Suspendisse convallis nibh in nisl ultrices porttitor. Etiam mattis mauris eget
lectus ultricies, ut laoreet leo aliquet. Sed justo quam, ornare nec ex eget, consequat
feugiat purus. Donec ultricies metus quis fermentum feugiat. Proin vehicula eu ex vel
laoreet. Nullam nec dictum ante\footnote{\label{footnote-dcne2014}
\url{http://camp.drupalne.org/session/drupal-case-commons-based-peer-production}}

\end{document}


I'm not really sure whether long URLs in footnotes are really useful for the reader. A list of URLs at the end of the document might be better, leaving in the footnote just a pointer (that can still become a hyperlink).

• Thanks a lot @egreg! That worked perfectly, you made my day :-) I will attach another MWE with the whole set of options related to language which was clashing, in case it can be useful for someone else. Nov 19, 2014 at 10:45

This is a MWE with the solution provided by @egreg, and including the language options which were clashing, in case it can be useful for someone else

\documentclass[a4paper,12pt]{report}

\usepackage[hyphens]{url}
\usepackage[style=apa, backend=biber]{biblatex}
\DeclareLanguageMapping{british}{british-apa}
\usepackage[british]{babel}
\usepackage{hyperref}

\usepackage[margin=2.5cm]{geometry}
\usepackage[utf8]{inputenc}

\usepackage[usenames,dvipsnames]{color}
\usepackage{setspace}
\usepackage{titlepic}
\usepackage{graphicx}
\usepackage[nodayofweek]{datetime}
\usepackage{float}
\usepackage{booktabs}
\usepackage{tablefootnote}
\usepackage{multirow}

\usepackage{titlesec}
\setcounter{secnumdepth}{4}
\titleformat{\paragraph}
{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titlespacing*{\paragraph}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}

\usepackage{csquotes}

\usepackage[super]{nth}
\usepackage[gen]{eurosym}

\begin{document}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis commodo leo quis gravida
tempor. Suspendisse convallis nibh in nisl ultrices porttitor. Etiam mattis mauris eget
lectus ultricies, ut laoreet leo aliquet. Sed justo quam, ornare nec ex eget, consequat
feugiat purus. Donec ultricies metus quis fermentum feugiat. Proin vehicula eu ex vel
laoreet. Nullam nec dictum ante\footnote{\label{footnote-dcne2014}\url{http://camp.drupalne.org/session/drupal-case-commons-based-peer-production}}