I am using a 2 columns IEEEtran template. I have some long URLs in the references section. One of the URLs exceeds the column's width and does not break properly. How can I force URLs to break into multiple lines if the URL exceeds the column width?
Here is my main script:
\documentclass[conference]{IEEEtran}
\IEEEoverridecommandlockouts
\usepackage[noadjust]{cite}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{xcolor}
\usepackage{hyperref}
\begin{document}
\title{Title Here}
\maketitle
\begin{abstract}
Abstract here.
\end{abstract}
\section{Introduction}\label{sec:intro}
Some text here \cite{test}.
\bibliographystyle{IEEEtran}
\bibliography{ref}
\end{document}
Here is the ref.bib script:
@misc{test,
author = {Xing, Wang},
title = {My Ref title},
date = {2018},
note = {Accessed Dec. 1, 208},
url = { https://www.zzzzz.com/article/gggggg-aa-zzzzz-aaa-qqq-rrr-tttt-yyyy-8888-vvvvvv-qqqqqq-lllll-xxxxxx-oooooo-pppppp/},
}
urlpackage, immediately before loadinghyperref, with the optionshyphensandspaces. – Mico Dec 30 '18 at 06:40Option clash for package url. \usepackage– user9371654 Dec 30 '18 at 06:50\PassOptionsToPackage{hyphens,spaces}{url}and say\usepackage{url}only (without the options mentioned by Mico – Dec 30 '18 at 08:38urlbeforehyperref? For sure, the only way I can manage to generate an "Option clash for package url" error message is if I loadurlafter instead of beforehyperref. – Mico Dec 30 '18 at 10:12urlis loaded beforehyperref. :-) Ifurlis loaded afterhyperref, there's no error message, but also no line-breaks of URL strings at hyphens... – Mico Dec 30 '18 at 10:13urlas well with different options, leading to a clash eventually. I am not using links very often nor biber etc. as such I don't encounter such troublesome url problems – Dec 30 '18 at 10:18hyperrefpackage loads theurlpackage automatically, but unfortunately without specifying the optionsspacesandhyphens, if it (theurlpackage) hasn't been loaded already. That's whyurlmust be loaded beforehyperrefif the optionsspacesandhyphensare meant to have an effect. – Mico Dec 30 '18 at 10:22hyperref. But yes, I have too limited knowledge about url typesetting features, so\PassOptionsToPackagewas a try... – Dec 30 '18 at 10:26