1

I have a very simple problem with my script on Latex and I hope that someone will be able to help me.

I need to add an hyperlink for my email on my cv, so that a recruiter could send me directly an email clicking on it. Also, I would like that this link appears in blue. With the following code, I am able to have an hyperlink. I have searched on this site and on google but I am not able to adjust my code and to make the email appear in blue. Can someone help me?

Thank you in advance

\documentclass[10pt,a4paper,sans]{moderncv}

\moderncvstyle{casual} \moderncvcolor{black} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lipsum}

\usepackage[scale=0.75]{geometry}

\firstname{} \familyname{\large{blabla}}

\title{\large{Curriculum Vitae}}

\begin{document} \maketitle \thispagestyle{empty} \vspace{-1cm} \small{ \section{Personal Information} \cventry{Birth}{\textnormal{blablabla}}{blablabla}{blablabla}{}{} \cvitemwithcomment{Mobile phone}{\textnormal{\small{$+$}blablablabla}}{} \cventry{Address}{\textnormal{blablabla}}{blablabla}{\emph{}Italy}{}{} \cvitem{Email}{\emaillink{stancoantonio94@gmail.com}}

\renewcommand{\listitemsymbol}{\textbf{-- }} % Changes the symbol used for lists

} \end{document}

  • Welcome to tex.sx. – barbara beeton Apr 21 '21 at 14:33
  • you can use \PassOptionsToPackage{colorlinks}{hyperref} in the preamble, then colors are activated and you can change them locally or globally in the document. – Ulrike Fischer Apr 21 '21 at 14:37
  • Hello, thank for your answer. I have just copied and pasted your line of code at the beginning of my script. It works, but I see the link in a pinky color that I think it is a little bit "unprofessional". How can I switch to a more formal blue? Consider that my latex skills are quite low – Antonio Stanco Apr 21 '21 at 14:40

1 Answers1

0

It's a two-stage process, based on the answer here: Changing moderncv link color of href. One stage is using the \AtEndPreamble hook, which is how the package does it (https://ctan.org/tex-archive/macros/latex/contrib/moderncv). The second stage is changing the urlcolor after \begin{document}.

You may even consider this a duplicate question/answer.

\documentclass[10pt,a4paper,sans]{moderncv} 
\moderncvstyle{casual}
\moderncvcolor{black}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}

\usepackage[scale=0.75]{geometry}

\firstname{} \familyname{\large{blabla}}

\title{\large{Curriculum Vitae}} \AtEndPreamble{ \hypersetup{ colorlinks=true, }} \begin{document} \hypersetup{urlcolor=blue} \maketitle \thispagestyle{empty} \vspace{-1cm} \small{ \section{Personal Information} \cventry{Birth}{\textnormal{blablabla}}{blablabla}{blablabla}{}{} \cvitemwithcomment{Mobile phone}{\textnormal{\small{$+$}blablablabla}}{} \cventry{Address}{\textnormal{blablabla}}{blablabla}{\emph{}Italy}{}{} \cvitem{Email}{\emaillink{stancoantonio94@gmail.com}}

\renewcommand{\listitemsymbol}{\textbf{-- }} % Changes the symbol used for lists

}\end{document}

enter image description here