For my resume I'm using the great moderncv, but I'd like to customize it a little.

For example I'd like to reduce the heigth of the blank space after the title.

In moderncvstyleclassic.sty, I could change line 143 from




which does the job. How can I achive the same result without editing the .sty located on /usr/local/texlive...?


2 Answers 2


Line 143, the \usebox{\makecvtitlepicturebox}\\[2.5em]% command, is part of the \renewcommand*{}{} command that begins on line 93. The scope of this \renewcommand*{}{} extends all of the way until line 148.

So, you can copy and paste the entirety of this \renewcommand*{}{} into your preamble, only editing the part that is relevant for you. That is to say, place the following code in the preamble of your .tex file:

  % recompute lengths (in case we are switching from letter to resume, or vice versa)
  % optional detailed information (pre-rendering)
  \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
    \protected@edef\phonesdetails{\phonesdetails\protect\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
  \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
    \protected@edef\socialsdetails{\socialsdetails\protect\makenewline\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
        \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
      \phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict
      \socialsdetails% needs to be pre-rendered as loops and tabulars seem to conflict
  % optional photo (pre-rendering)
  % name and title
  \ifthenelse{\lengthtest{\makecvtitlenamewidth=0pt}}% check for dummy value (equivalent to \ifdim\makecvtitlenamewidth=0pt)
    \namestyle{\@firstname\ \@lastname}%
  % optional detailed information (rendering)
  \llap{\usebox{\makecvtitledetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvtitlenamewidth is forced
  % optional photo (rendering)
  % -------------------------------------------------------------------
  % this part immediately below has been modified for your purposes
  % -------------------------------------------------------------------
  % optional quote
  \par}% to avoid weird spacing bug at the first section if no blank line is left after \makecvtitle

Note that you need to wrap the contents of the \renewcommand*{}{} in \makeatletter . . . \makeatother.

Finally, you may want to see this answer for some discussion about modifying the content of .sty files, particularly in light of the LaTeX Project Public License (LPPL).


You can add two lines to your preamble to patch the \makecvtitle command.


(This is also possible using the etoolbox package but I prefer xpatch.)

You can use the last two parameters to set code snippets for Success and Failure of the patching (a warning for example).

You must log in to answer this question.

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