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{[email protected]}}


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

}
\end{document}
3
  • Welcome to tex.sx. Apr 21, 2021 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. Apr 21, 2021 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 Apr 21, 2021 at 14:40

1 Answer 1

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{[email protected]}}


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

}\end{document}

enter image description here

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .