0

I use Awesome-CV template where an e-mail adress is added by \email{user@mail.com}.

The body of the command is as follows:

% Defines writer's email (optional)
% Usage: \email{<email adress>}
\newcommand*{\email}[1]{\def\@email{#1}}

How do add a hyperlink to the e-mail adress? I tried \href{mailto:\email{user@mail.com}}{user@mail.com} but there are many errors when I try to compile.

  • the basic syntax would be \href{mailto:user@mail.com}{user@mail.com}, but as far as I remember, the \email macro is a shorthand for this so you should just use \email{user@mail.com} – ebosi Jun 4 '17 at 17:14
  • @ebo And you're totally correct. I did also not fully get what the user wants. – TeXnician Jun 4 '17 at 17:17
3

You can use email as you would normally and then a

\hypersetup{colorlinks}

directly after you loaded the class. This would e.g. color the links. If you want boxes instead use pdfborder={1 1 1} or something adjusted to your liking.

See the hyperref manual for more information.


Update: As you did not understand how I meant this (following code from Overleaf template):

\documentclass[11pt, a4paper]{awesome-cv}
\hypersetup{colorlinks}

\name{Byungjin}{Park}
\position{Software Engineer{\enskip\cdotp\enskip}Security Expert}
\address{246-1002, Gwangmyeongmayrouge Apt. 86, Cheongna lime-ro, Seo-gu, Incheon-si, 404-180, Rep. of KOREA}

\mobile{(+82) 10-9030-1843}
\email{posquit0.bj@gmail.com}
\homepage{www.posquit0.com}
\github{posquit0}
\linkedin{posquit0}

...

Just proceed as usual!


Update 2: If you did not mean anything with emphasis: The hyperlink is already there, even if you just use \email. It just won't be shown as the class uses the hyperref option hidelinks.

  • Thanks, but my aim is to use \email{user@mail.com} because it adds e-mail to the right dimension of a page and it also adds a github icon. I know it is possible, becuase I have already done it but I lost the contents of my CV due to hardware error. – menteith Jun 4 '17 at 17:10
  • @menteith That's what you shall use! Just put this command after your documentclass and you will notice the difference. – TeXnician Jun 4 '17 at 17:11
  • The hyperlink is already there, even if you just use \email Are you sure? I switched from Adobe Reader to Foxit PhantomPDF and perhaps Foxit won't show links. – menteith Jun 4 '17 at 17:19
  • YES! As I said in my answer it just uses the hyperref option hidelinks and that causes links to not show up. You can look it up in the sources, if you want. – TeXnician Jun 4 '17 at 17:21
  • Well, i like templates. :-p – Johannes_B Jun 4 '17 at 17:44

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.