# Moving the picture in moderncv classic

Hej, I have been writing my cv using moderncv classic style. It looks pretty already, but I still want to move the picture down. At the moment, the bottom of the picture is aligned with the line of Curriculum Vitae (see horizontal line in picture).

What I want to do is to align the picture so that the middle line of the picture is roughly on the same line like the Name "John Doe". On the other hand the distance between the header and the top of the picture and between the word "Curriculum vitae" and "Personal Data" (a) should have the same distance.

The MWE I used for the picture above is the following:

\documentclass[12pt,a4paper,sanserif]{moderncv}

\usepackage[latin1]{inputenc}
\usepackage{graphicx}
\usepackage[ngerman]{babel}
\usepackage{marvosym}
\usepackage{fancyhdr}
\pagestyle{fancy}

% HEADER
\chead{John Doe | Doestreet 10 | 12345 Doetown | \Mobilefone\hspace{0,2cm}+1234567 \\ \Letter \hspace{0,1cm} John.Doe@Does.com | \ComputerMouse \hspace{0,1cm} [EnterFancyLinkHere]\\
\hline}

\moderncvstyle{classic} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{black} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'

\usepackage[scale=0.8]{geometry} % Reduce document margins

\AtBeginDocument{\recomputelengths}
\AtBeginDocument{\definecolor{sectionrectanglecolor}{rgb}{0,0,0}}
\AtBeginDocument{\definecolor{sectiontitlecolor}{rgb}{1,0,0}}

\firstname{\Huge John} % Your first name
\familyname{Doe} % Your last name
\title{Curriculum Vitae}

\photo[150pt][0pt]{pictures/John_Doe_Picture.png} % The first bracket is the picture height, the second is the thickness of the frame around the picture (0pt for no frame)

%----------------------------------------------------------------------------------------
\let\sffamily\rmfamily

\begin{document}
\makecvtitle % Print the CV title
\section{Personal Data}
\cvitem{Date of Birth}{01.01.2000}
\cvitem{Place of Birth}{Doetown}

\end{document}


In case the goal or the question is not clear please do not hesitate to say so :). Thanks alot for your help.

Best wishes,

Sebastian

• Welcome to TeX.SX! Your document isn't compilable. – user31729 Jun 5 '16 at 9:23

## 1 Answer

You can do that patching the \makecvhead command with \raisebox. Note I had to change some icons commands, as loading marvosym conflicts with the class. The solutions to this conflicts consists in declaring the icons will come from marvosym and using the names to be found in moderncviconsmarvosym.sty. Also, the option to have a sans serif font in your cv is sans, not sanserif.

\documentclass[12pt, a4paper, sans]{moderncv}

\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[ngerman]{babel}
\moderncvicons{marvosym}
\usepackage{fancyhdr}
\pagestyle{fancy}

% HEADER
\chead{John Doe | Doestreet 10 | 12345 Doetown | \mobilephonesymbol\hspace{0,2cm}+1234567 \\ \addresssymbol \hspace{0,1cm} John.Doe@Does.com | \homepagesymbol \hspace{0,1cm} [EnterFancyLinkHere]\\
\hrule}

\moderncvstyle{classic} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{black} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'

\usepackage[scale=0.8]{geometry} % Reduce document margins

\AtBeginDocument{\recomputelengths}
\AtBeginDocument{\definecolor{sectionrectanglecolor}{rgb}{0,0,0}}
\AtBeginDocument{\definecolor{sectiontitlecolor}{rgb}{1,0,0}}

\firstname{\Huge John} % Your first name
\familyname{Doe} % Your last name
\title{Curriculum Vitae}

\photo[150pt][0pt]{wolf1} % The first bracket is the picture height, the second is the thickness of the frame around the picture (0pt for no frame)

%----------------------------------------------------------------------------------------

\usepackage{xpatch}
\xpatchcmd{\makecvhead}{%
\usebox{\makecvheadpicturebox}\fi%
}{%
\raisebox{-0.3\height}{\usebox{\makecvheadpicturebox}}\fi%
}{}{}

\begin{document}

\makecvtitle % Print the CV title
\section{Personal Data}
\cvitem{Date of Birth}{01.01.2000}
\cvitem{Place of Birth}{Doetown}

\end{document}


• Thanks alot for the answer. Can you give me a hint about how to declare the icons in moderncviconsmarvosym.sty? – Sebastian Jun 6 '16 at 15:27
• It goes along such lines (cf lines 40-45 of moderncviconsmarvosym.sty): \renewcommand{\mobilephonesymbol}{\marvosymbol{72}~}. If you want to make available an icon from within moderncv.cls, you give it a name which doesn't conflict with something previously defined, or directly use \marvosymbol{xx}. Note you also can use the fontawesome icon fonts, which has a lot more icons (634!), with the declaration \moderncvicons{fontawesome}. – Bernard Jun 6 '16 at 17:29