0

I try to underline a url. I can't get it to work. So now I will manually insert underline below my url.

How can a make the underline thinner and color it blue?

\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[normalem]{ulem}
\usepackage{hyperref}
\hypersetup{
    colorlinks=true,
    urlcolor=blue,
    urlbordercolor=blue,
    pdfborderstyle={/S/U/W 1}
}
\urlstyle{same}

\begin{document} Url: \uline{\url{https://stackexchange.com/}} \end{document}

This is what I get with the above tex file:

enter image description here

  • 1
    I think you'll find the answer here: https://tex.stackexchange.com/questions/26071/how-can-i-have-colored-and-underlined-links-with-hyperref – pikopiko Oct 31 '20 at 22:23

1 Answers1

1

Like this? I have added only \usepackage{xcolor} and \textcolor{blue}{...}.

\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[normalem]{ulem}
\usepackage{hyperref}
\usepackage{xcolor}

\hypersetup{ colorlinks=true, urlcolor=blue, urlbordercolor=blue, pdfborderstyle={/S/U/W 1} } \urlstyle{same}

\begin{document} Url: \textcolor{blue}{\uline{\url{https://stackexchange.com/}}} \end{document}

enter image description here

Sebastiano
  • 54,118