title: linebreak in url with Bibtex and hyperref package
body: <p>Why is this item not shown properly in my bibliography?</p>
  
  <pre>
  @misc{ann,
      abstract = {ANN is an implbmentation of nearest neighbor search.},
      author = {David M. Mount and Sunil Arya},
      howpublished = {\url{http://www.cs.umd.edu/~mount/ANN/}},
      keywords = {knn},
      posted-at = {2010-04-08 00:05:04},
      priority = {2},
      title = {ANN.},
      url = "http://www.cs.umd.edu/~mount/ANN/",
      year = {2008}
  }
  
  @misc{Nilsson96introductionto,  
      author = {Nilsson, Nils J.},  
      citeulike-article-id = {6995464},  
      howpublished = {\url{http://robotics.stanford.edu/people/nilsson/mlbook.html}},  
      keywords = {*file-import-10-04-11},  
      posted-at = {2010-04-11 06:52:28},  
      priority = {2},  
      title = {Introduction to Machine Learning: An Early Draft of a Proposed Textbook.},  
      year = {1996}  
  }  
  </pre>
  
  <p><a href="https://i.stack.imgur.com/re5f5.png" rel="noreferrer"><img src="https://i.stack.imgur.com/re5f5.png" alt="alt text"></a>
  </p>
  
  <hr>
  
  <p>EDIT:</p>
  
  <p>I am using </p>
  
  <pre><code>\usepackage{hyperref}
  </code></pre>
  
  <p>not </p>
  
  <pre><code>\usepackage{url}
  </code></pre>
  
  <p>. It produces error when using url package together with it. So can the two not work together?</p>
  
  <p>I would like to use hyper links inside pdf file, so I want to use hyperref package instead of url package. I googled a bit, and try </p>
  
  <pre><code>\usepackage[hyperindex,breaklinks]{hyperref}
  </code></pre>
  
  <p>but there is still no line break just as before. How can I do it?</p>
  
  <hr>
  
  <p>EDIT:</p>
  
  <p>When using url and hyperref together, 
  if it is just</p>
  
  <pre><code>\usepackage{hyperref}  
  \usepackage{url}
  </code></pre>
  
  <p>the compilation by latex is fine, but the link is still hyperlink and has still no linebreak. If I do not use hyperref package, the link has linebreak, but I lose hyper links. Since \url can be used in both hyperref and url packages, how can I specify which package's \url is being used?</p>
  
  <p>If it is </p>
  
  <pre><code>\usepackage{hyperref}  
  \usepackage[hyphens]{url}
  </code></pre>
  
  <p>the compilation by latex command will report clash with url:</p>
  
  <blockquote>
    <p><code>! LaTex Error: Option clash for package url.</code></p>
  </blockquote>
  
  <p>So I wonder how I should do?</p>