GeneralProblem with URLs and \bibitem

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
andresl
Posts: 1
Joined: Sun May 18, 2014 8:26 am

Problem with URLs and \bibitem

Post by andresl »

Hi.
I'm writing bibliography with the \thebibliography tag. I need to write an item for an URL. I'm writing it like this:

Code: Select all

\bibitem[WWW0007]{WWW0007}
IBM Releases Platform Resource Scheduler for OpenStack Cloud Management \\
\url{https://www.ibm.com/developerworks/community/blogs/ibmsyssw/entry/ibm_releases_platform_resource_scheduler_for_openstack_cloud_management?lang=en}
But I'm getting this error:
Underfull\hbox (badness 10000) in paragraph lines 312--314.
If I erase the \url tag it gets solved but I do (of course) need the URL. I've been told to use \thebibliography so this is a must.

Thanks in advanced.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Problem with URLs and \bibitem

Post by Stefan Kottwitz »

Hi andresl,

welcome to the forum!

It seems that the URL cannot be wrapped in a good way at the end of the line. It's like a very long word. You could tell the \url command to allow breaking at more places. Here is an example, written by Bes on TeXwelt.de, where he added the possibility to break at arbitrary small letters - he extends the \UrlBreaks macro:

Code: Select all

\documentclass{article}
\usepackage{url}
\usepackage{etoolbox}
\appto\UrlBreaks{\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}
\begin{document}
\show\UrlBreaks

Eine URL: \url{http://texwelt.de/wissen/fragen/5303/%
wiekannichmittikzeinentextamseitenrandvonuntennachobenschreiben}
\end{document}
Stefan
LaTeX.org admin
Post Reply