0

How can I prevent only the email in the moderncv theme of latex from being clickable (a url) ? Is there a function that disables the enclosed url ? I think this will also be helpful for other links in my cv that I want unclickable.

% personal datas
\firstname{}
\familyname{}
\address{}{}
\mobile{}              
\email{[email protected]} 
3
  • 2
    Why should they not be clickable?
    – Mensch
    Commented Oct 27, 2016 at 14:04
  • then don't use email macro
    – Zarko
    Commented Nov 6, 2016 at 20:53
  • 1
    If I remember correctly, there are some PDF viewers that detect email addresses and automatically make them hyperlinks even if the document didn't explicitly create a link, so disabling the email hyperlink might not necessarily have an effect, depending on the PDF viewer. Commented Nov 6, 2016 at 21:00

1 Answer 1

2

Modify \emaillink to add a link only if the optional argument is expressed.

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}

\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}

% change \emaillink so it doesn't make a link by default
\renewcommand*{\emaillink}[2][]{%
  \ifthenelse{\equal{#1}{}}%
    {#2}%
    {\href{mailto:#2}{#1}}}

% personal data
\name{John}{Doe}
\title{Resumé title}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{[email protected]}
\homepage{www.johndoe.com}
\social[linkedin]{john.doe}
\social[twitter]{jdoe}
\social[github]{jdoe}
\extrainfo{additional information}
%\photo[64pt][0.4pt]{picture}
\quote{Some quote}

\begin{document}

\makecvtitle

\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}

\section{Master thesis}
\cvitem{title}{\emph{Title}}
\cvitem{supervisors}{Supervisors}
\cvitem{description}{Short thesis abstract}

\end{document}

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