[Tex/LaTex] Reduce the space between \email symbol and the mail in moderncv

moderncv

Yesterday I asked several questions such as changing the color of specific headings. The answers are here: Change colors of \mobile, \address and \title in Modern Cv

The other problem I didn't manage to solve was that I wanted to put in bold the mail. The following command does it:

\renewcommand*{\emaillink}[2][]{
\ifthenelse{\equal{#1}{}}
{\textbf{\href{mailto:#2}{#2}}}
{\textbf{\href{mailto:#2}{#1}}}}

But I would like to reduce the space between \email symbol and the mail. Something like \email{hspace{-0.2cm} aaa@aaa.com} doesn't work.

Best Answer

The email symbol is put there by the command \emailsymbol. The definition of this depends on the icon theme used. For your example it uses symbols from marvosym, and the definition of \emailsymbol (and others) are found in the file moderncviconsmarvosym.sty. There you'll find

 \renewcommand*{\emailsymbol}{\marvosymbol{66~}}

Which adds a (non breakable) inter word space between the symbol and the email address. Add e.g.

\renewcommand*{\emailsymbol}{\marvosymbol{66}}

to your preamble to remove this space, which places the symbol closer to the address. You could also add some negative space here to move it even closer, e.g.

\renewcommand*{\emailsymbol}{\marvosymbol{66}\hspace{-.1cm}}