Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm able to style the contents (color, font size), but I can't change the color of the symbol.

http://i.imgur.com/fdpfXGM.png

Here's the code I'm working with:

\documentclass[10pt,a4paper]{moderncv}
\moderncvtheme[blue]{classic}                
\usepackage[utf8]{inputenc}
\usepackage[scale=0.8]{geometry}

\firstname{François}
\familyname{Tessier}
\title{Concepteur / Développeur}              
\address{<Rue>}{<CP Ville>}    
\mobile{\color{light-blue}{+44000000000}}                    
\email{mymail@mail.com}                      

\begin{document}
\maketitle

\end{document}

Also, for some reason I can't style the email at all, I can't change the color, fontsize etc. But it works with address, mobile, title etc. Could it be something to do with the @ symbol?

share|improve this question
1  
Welcome to TeX.sx! –  texenthusiast May 2 '13 at 3:05
    
    
This help? Link formatting: colors, underlines in moderncv –  rickhg12hs May 2 '13 at 3:14
    
@texenthusiast thank you –  user2130426 May 2 '13 at 3:39
    
Do you want to change the color of only the links, or of the whole personal information section? –  Xavier May 2 '13 at 3:48
show 2 more comments

3 Answers

up vote 2 down vote accepted

As it is now, there is unfortunately no elegant solution to do that (yet) :(

The color of the personal information section is controlled by a color called color2, the secondary color of each color scheme (after the primary color color1, while color0 controls the color of the main text (black)).

So you could simply redefine that color, anywhere after \moderncvcolor (or the deprecated \moderncvtheme) and before \makecvtitle / \maketitle, by:

\definecolor{color2}{rgb}{0.50,0.33,0.80}

This will however also change the color of the other elements that rely on color2, such as the rendering of \title (on top of my mind, it is actually the only other element that depends on it in the "classic" style variant). A hacky way to counter that is to force the color of \title through its argument.

Putting it together:

\documentclass[10pt,a4paper]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage[scale=0.8]{geometry}

\colorlet{titlecolor}{color2}% save the secondary color before redefining it
\definecolor{color2}{rgb}{0.50,0.33,0.80}% redefine the secondary color to purple

\firstname{François}
\familyname{Tessier}
\title{\textcolor{titlecolor}{Concepteur / Développeur}}% force to render the title in the previously saved original secondary color
\address{<Rue>}{<CP Ville>}
\mobile{+44000000000}
\email{mymail@mail.com}

\begin{document}
\makecvtitle
\end{document}

yields

enter image description here

share|improve this answer
    
Thank you, this is a clever solution. –  user2130426 May 2 '13 at 15:44
    
Also, do you know how to further style this personal info section and remove the italics? I'd rather the font was styled normally. –  user2130426 May 2 '13 at 15:54
    
@user2130426 Just redefine \addressfont –  Xavier May 2 '13 at 17:50
add comment

Yes, the mobile symbol is set before the mobile number. As such, your definition - that includes \color - changes the colour too late. You need to add the colour to the mobile symbol and it will flow through to the mobile number as well:

\makeatletter
\protected@edef\mobilesymbol{\protect\color{blue}\mobilesymbol}
\makeatother

enter image description here

To change the colour of other personal content on a case-by-case basis, you need to update \addressymbol, \@addresscity, \@addresscountry, [\mobilesymbol,] \phonesymbol, \faxsymbol, \emailsymbol, \homepagesymbol and/or \@extrainfo.

share|improve this answer
    
I see, thank you. Can you tell me where in that code I should enter the mobile number? –  user2130426 May 2 '13 at 15:41
    
@user2130426 As usual, use \mobile{+44000000000} in your preamble –  Xavier May 2 '13 at 15:45
add comment

Use

\definecolor{color2}{RGB}{0,0,128}

to change the line, then override again for the actual text, like so:

\definecolor{mediumgrey}{RGB}{128,128,128}
\mobile{\color{mediumgrey}{+44000000000}}        

Take a look at this example of mine: Resume template with leading line to start section

share|improve this answer
    
Basically, what Xavier says. –  Ingmar May 2 '13 at 6:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.