2

I'm trying to break a url that is part of the figure's caption. I used \burl but didn't work. What can I do?

This is my main code:

\documentclass[11 pt, letterpaper, oneside, openright]{book}
\listfiles 

\usepackage[spanish]{babel} % Manejo de idiomas}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\usepackage[pages = some]{background} 
\usepackage{tabularx}
\usepackage{epigraph}
\usepackage{kantlipsum}
\usepackage{nomencl}
\usepackage[acronym]{glossaries}
\usepackage{graphicx}
\graphicspath{ {imagenes/} }

\usepackage[style=ieee, backend=biber]{biblatex}
\bibliography{bibliografia}

\usepackage{hyperref}
\PassOptionsToPackage{hyphens}{url}

\usepackage{caption}
\glsenablehyper

\usepackage{tikz}
\usetikzlibrary{mindmap}

\usepackage{geometry}
 \geometry{
 letterpaper,
 left=20mm,
 right=20mm,
 top=30mm,
 bottom=30mm,
 }

\begin{document}
\include{Chap2}
\end{document}

This is my Chap2.tex code:

\begin{figure}[t]
\includegraphics[width=\textwidth]{calderacarbon.jpg}
\captionof{figure}{Diagrama de una caldera de carbón pulverizado.}
\captionsetup{font={footnotesize,it}, width=\textwidth}
\caption*{Fuente: Valvexport, Inc. \url{http://www.valvexport.com/soluciones-para-alimentacion-y-combustion-de-carbon-pulverizado.html}}
\label{fig:Calderacarbon}
\end{figure}

And this is my result:

enter image description here

Thanks for your help

EDIT: I also used \usepackage[hyphens]{url} but as I'm using {hyperref} I need to put it in the following way

\usepackage[colorlinks=false]{hyperref}
\PassOptionsToPackage{hyphens}{url}

But this doesn't work either

Karalga
  • 1,232
Juan David
  • 1,421

1 Answers1

2

You need to pass \PassOptionsToPackage{hyphens}{url} before the url package is loaded for the first time - which in your case is by biblatex. So if you change your code to:

\documentclass[11 pt, letterpaper, oneside, openright]{book}
\listfiles 
\usepackage[spanish]{babel} % Manejo de idiomas}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\usepackage[pages = some]{background} 
\usepackage{tabularx}
\usepackage{epigraph}
\usepackage{kantlipsum}
\usepackage{nomencl}
\usepackage[acronym]{glossaries}
\usepackage{graphicx}
\graphicspath{ {imagenes/} }

\PassOptionsToPackage{hyphens}{url}

\usepackage[style=ieee, backend=biber]{biblatex}

\usepackage{hyperref}

it works.

Example

Karalga
  • 1,232