move the name

Asked by radouani anass on 2010-10-10

Hello,
I'm trying to customize my CV template. I would like to move the name on top to gain more space so I can write a little title under it. But I don't find which code I have to modify.
can you help me please.
Best regards

Question information

Language:
English Edit question
Status:
Answered
For:
moderncv Edit question
Assignee:
Xavier Danaux Edit question
Last query:
2010-10-10
Last reply:
2010-10-12
Xavier Danaux (xdanaux) said : #1

Hi Radouani,

You need to be a little more specific with what you mean by "move the name on top". In essence,

- If you want to reduce the top margin, you need to do something like "\usepackage[scale=0.85]{geometry}". Look for a similar line at the top of the template. It is set by default to "scale=0.8", try to play with the value. You can also specifically force the top margin (which however is not recommended) by adding a "top" option, e.g. "\usepackage[scale=0.80,top=1cm]{geometry}

- If you want to change the fonts of the name, you need to redefine \firstnamefont and \familynamefont. As an example, here are the definition from the casual style:
\renewcommand*{\firstnamefont}{\fontsize{38}{40}\sffamily\mdseries\upshape}
\renewcommand*{\familynamefont}{\firstnamefont}

- If you want to completely change the way the header is formatted, you need to redefine \maketitle.

Kind regards,

Xavier

Naveen s (naveenu) said : #2

Hello Xavier,

    I have a related question. I am trying to modify the font size of the name as the name wraps around to the second line (I have a long family name).

I tried to do what you suggested above.
\renewcommand*{\firstnamefont}{\fontsize{20}{24}\sffamily\mdseries\upshape}
\renewcommand*{\familynamefont}{\firstnamefont}
\firstname{First}
\familyname{Family}

But, the above doesn't do anything to the font size. Please advise me if I am not doing this right. Thank you in advance for your help.

Naveen s (naveenu) said : #3

This worked:
   \firstname{\fontsize{20}{24}\sffamily\mdseries\upshape{First}}

Xavier Danaux (xdanaux) said : #4

Hi Naveen,

It's probably due to the fact that you're definition takes place before the loading of the theme, hence it is overwritten.

Try to put the 2 \renewcommand just before \maketitle and let me know if you still experience the issue.

Kind regards,

Xavier

Naveen s (naveenu) said : #5

Hi Xavier,

   Putting \renewcommand just before \maketitle worked. Thank you very much for the help and the quick response.

Thank you,
Naveen

Xavier Danaux (xdanaux) said : #6

You're most welcome. Good luck with your application!

Xavier

Can you help with this problem?

Provide an answer of your own, or ask radouani anass for more information if necessary.

To post a message you must log in.