1

I do a manuel bibliography (not using bibtex or sth. like that) and I want to put some URL in it. But some of the URL are over the side edge.

\documentclass[a4paper, 12pt]{article}
\usepackage{amsmath,amssymb,slashbox,graphicx}
\usepackage[utf8]{inputenc}
\usepackage[onehalfspacing]{setspace}
\usepackage[top=25mm, left=25mm, right=50mm, bottom=30mm]{geometry}
\usepackage{acronym}
 %verlinkt mir Inhaltsverzeichnis, abkürzungsverzeichnis etc.
\usepackage{booktabs} %für Tabellen
\usepackage{microtype}
\usepackage{multirow}
\usepackage{subfigure} 
\usepackage{rotating}
\usepackage[hyphens]{url}
\usepackage{hyperref}
\begin{document}
%everything works fine
\section*{Literaturverzeichnis}
\noindent Corbet, S.; Meegan, A.; Larkin, C.; Lucey, B. und Yarovaya, L. (2018): Exploring the dynamic relationships between cryptocurrencies and other financial assets. Economics Letters, Vol. 165, S. 28-34, in: \url{https://reader.elsevier.com/reader/sd/321DB6FE9DA3528B4C7477C4F104A4DCBF0AC14D8FCC0E9E1FED3C575B50FC25FDBBCF7FC7C8305801B8B6EC4A2D58DB}, abgerufen am 05.06.2018.\\ 
\end{document}

How can I divide the Link? I have a few of them looking over the edge. Thanks in advance

1 Answer 1

2

With \usepackage[hyphens]{url} the url can only be broken at hyphens, which your url does not contain, thus it can not be broken.

Using the xurl package instead offers much more possible breaking points:

\documentclass[a4paper, 12pt]{article}
%\usepackage{amsmath,amssymb,slashbox,graphicx}
\usepackage[utf8]{inputenc}
\usepackage[onehalfspacing]{setspace}
\usepackage[top=25mm, left=25mm, right=50mm, bottom=30mm]{geometry}
\usepackage{acronym}
 %verlinkt mir Inhaltsverzeichnis, abkürzungsverzeichnis etc.
\usepackage{booktabs} %für Tabellen
\usepackage{microtype}
\usepackage{multirow}
\usepackage{subfigure} 
\usepackage{rotating}
\usepackage{xurl}
\usepackage{hyperref}
\begin{document}
%everything works fine
\section*{Literaturverzeichnis}
\noindent Corbet, S.; Meegan, A.; Larkin, C.; Lucey, B. und Yarovaya, L. (2018): Exploring the dynamic relationships between cryptocurrencies and other financial assets. Economics Letters, Vol. 165, S. 28-34, in: \url{https://reader.elsevier.com/reader/sd/321DB6FE9DA3528B4C7477C4F104A4DCBF0AC14D8FCC0E9E1FED3C575B50FC25FDBBCF7FC7C8305801B8B6EC4A2D58DB}, abgerufen am 05.06.2018.
\end{document}

enter image description here

5
  • if I write \usepackage{xurl} i get file´xurl.xty´not found. How can i fix it?
    – florian
    Commented Jul 5, 2018 at 14:45
  • @florian It is a pretty new package (released last December), so you may have to update your tex distribution Commented Jul 5, 2018 at 14:46
  • I just did an update. now I have version TeXstudio 2.12.8 I still get the same error message
    – florian
    Commented Jul 5, 2018 at 15:01
  • @florian Texstudion is your editor. You need to update your distribution, typically something like miktex or texlive. Commented Jul 5, 2018 at 15:03
  • It works. Thanks a lot. I just did an Update of my Miktex. Thank you very much.
    – florian
    Commented Jul 5, 2018 at 15:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .