0

I was writing a bibliography. At a point, some extra spaces appear. I couldn't fix it anyhow.

\begin{thebibliography}{90}
    \bibitem{Ref1} Java, \url{https://en.wikipedia.org/wiki/Java_(programming_language)}
    \bibitem{Ref2} James Gosling, \url{https://en.wikipedia.org/wiki/James_Gosling}
    \bibitem{Ref3} Java Compiler, \url{https://www.jdoodle.com/online-java-compiler/}
    \bibitem{Ref4} Escape Sequence, \url{https://docs.oracle.com/javase/tutorial/java/data/characters.html}
    \bibitem{Ref5} Format-Specifier, \url{https://www.geeksforgeeks.org/format-specifiers-in-java/}
\end{thebibliography}
egreg
  • 1,121,712
  • 2
    This answer may help: https://tex.stackexchange.com/questions/3033/forcing-linebreaks-in-url – Alan Xiang Jul 15 '22 at 17:00
  • This bibliography is set justified. Using ragged right would close up the only space in the last reference, just by moving the first part of the url to the left. Alternatively, allowing breaks in more places, e.g. at hyphens (as suggested in the answer linked by @AlanXiang) would improve the situation, but might still leave a noticeably wide space, since there is only one space in the line. – barbara beeton Jul 15 '22 at 17:07
  • 1
    One of the answers to the linked question recommends using xurl instead of url: arbitrary breaks in URLs are much better than huge strips of white space. – egreg Jul 15 '22 at 17:16

0 Answers0