# Long URLs in bibliography

I am having an issue with a url in the bibliography. I have some guesses what could be wrong, but none of the options I thought of helped so far. I am in need of professional help! As always, appreciated.

\documentclass[a4paper,11pt,twoside]{article}
\begin{document}
\cite{mcds}
\begin{thebibliography}{9}
\bibitem{mcds}
https://www.researchgate.net/publication/301771443\_MULTIPLE\_CRITERIA\_DECISION\_SUPPORT\_OF\_BUILDING\_LIFE\_CYCLE
\end{thebibliography}
\clearpage
\end{document}


It produces this error and obviously goes a lot over margins.

Shortening URL is not an option.

Load url and use the eponymous command, and don't "escape" the _ (underscore) symbols, i.e., don't input them as \_ inside the URL string.

\documentclass[a4paper,11pt,twoside]{article}
\usepackage{inconsolata}
\usepackage{url}
\Urlmuskip = 0mu plus 1mu

\begin{document}

See \cite{mcds}

\begin{thebibliography}{9}
\bibitem{mcds}
\url{https://www.researchgate.net/publication/301771443_MULTIPLE_CRITERIA_DECISION_SUPPORT_OF_BUILDING_LIFE_CYCLE}
\end{thebibliography}

\end{document}


• Yes, the URL does split now, but the Underfull \hbox error with 10000 badness still occurs. Any other suggestions? – Deramite Jul 30 '16 at 21:09
• I've added a fix. Note it may not work in all situations. It's simpler if you use a .bib file and bibtex or biber. – Bernard Jul 30 '16 at 21:31
• Unfortunately using .bib is not an option too. Well the error is gone in MWE, but it is still there in the main file. At least badness became 1924 so I turn a blind eye on it. Thanks! – Deramite Jul 30 '16 at 21:37
• You can try this too (also in the preamble):\expandafter\def\expandafter\UrlBreaks\expandafter{\UrlBreaks% save the current one \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j% \do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t% \do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D% \do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N% \do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X% \do\Y\do\Z}. The % are at the end of a line in the code. It allows to break the url at any letter. Not very light… – Bernard Jul 30 '16 at 21:40
• I've taken the liberty of changing all instances of \_ (back) to _. – Mico Jul 30 '16 at 21:52