1

Here is what I wrote

\documentclass[12pt, a4paper]{book}
\usepackage[colorlinks=true,breaklinks]{hyperref}
\usepackage[hyphenbreaks]{breakurl}
\usepackage{xcolor}
\definecolor{c1}{rgb}{0,0,1}
\definecolor{c2}{rgb}{0,0.3,0.9}
\definecolor{c3}{rgb}{0.3,0,0.9}
\hypersetup{linkcolor={c1},citecolor={c2},urlcolor={c3}}
\begin{document}
\begin{thebibliography}{}
\bibitem{beta}BetaFunction:https://en.wikipedia.org/wiki/Beta function
\end{thebibliography}
\end{document}

and the outcome is here

and when I compile the file, the urls in bibliography do not show in blue color. How can I fix this?

Thank you.

6
  • Please provide an actual example of a bib entry that contains a url field.
    – Mico
    Oct 10 '20 at 6:16
  • @Mico I edited the question. Oct 10 '20 at 6:22
  • Your example is not an MWE which makes it hard for us to test. Howevver, it looks like you are just typing the URL without telling LaTeX that it is one. try \url{https://en.wikipedia.org/wiki/Beta}.
    – schtandard
    Oct 10 '20 at 6:30
  • @schtandard Thank you so much. I remember I learned it from a youtube I dont know how i forget to write url. its working now thank you so much. Oct 10 '20 at 6:36
  • @AliShadhar Great. Could you please modify your example into an MWE anyway? That is, it should start with \documentclass, end with \end{document} and run through LaTeX, producing the output you show.
    – schtandard
    Oct 10 '20 at 6:38
2

You need to tell LaTeX that you are writing a URL:

\url{https://en.wikipedia.org/wiki/Beta function}

If you are serious about using bibliographies, you should consider using biblatex instead of typing them manually, though.

1
  • Thanks again :) +1 Oct 10 '20 at 6:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.