Search code examples
latexoverleaf

Warning Underfull \hbox (badness 6510) in paragraph


I get a warning while citing an article in my bibliography:

Warning : Underfull \hbox (badness 6510) in paragraph at lines 618--619

in my latex file.

 \documentclass[a4paper,12pt]{report}
 \begin{document}

 \begin{thebibliography}{00}

 \bibitem{backpropagation}
  Rumelhart, D., Hinton, G. \& Williams, R. Learning representations by back-propagating errors. Nature 323,533–536 (1986). https://doi.org/10.1038/323533a0

 \end{thebibliography}
 \end{document}

How do I solve this?


Solution

  • The problem is that your doi does not break lines. To avoid this, you could use the xurl package:

     \documentclass[a4paper,12pt]{report}
     
      \usepackage{xurl}
     
     
     \begin{document}
    
     \begin{thebibliography}{00}
    
    
     \bibitem{backpropagation}
      Rumelhart, D., Hinton, G. \& Williams, R. Learning representations by back-propagating errors. Nature 323,533–536 (1986). \url{https://doi.org/10.1038/323533a0}
    
     \end{thebibliography}
     \end{document}
    

    enter image description here

    If this line break in the middle of the link is too aggressive, you could also try the url or hyperref package:

     \documentclass[a4paper,12pt]{report}
     
      \usepackage{url}
     
     
     \begin{document}
    
     \begin{thebibliography}{00}
    
    
     \bibitem{backpropagation}
      Rumelhart, D., Hinton, G. \& Williams, R. Learning representations by back-propagating errors. Nature 323,533–536 (1986). \url{https://doi.org/10.1038/323533a0}
    
     \end{thebibliography}
     \end{document}
    

    enter image description here