# moderncv - how to put personal info under name

I'm new in LaTeX and moderncv. I'd like to put my contact info under name but I don't know how. I found this problem similar to mine, but it changes position of the picture. This is my .tex file after modification:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}

\makeatletter
\renewcommand*{\makecvtitle}{%
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputecvlengths%
% optional detailed information box
\newbox{\makecvtitledetailsbox}%
\savebox{\makecvtitledetailsbox}{%
\begin{tabular}[b]{@{}p{10cm}@{}}%
\ifthenelse{\isundefined{\@mobile}}{}{\makenewline\mobilesymbol\@mobile} %
\end{tabular}
}%
% optional photo (pre-rendering)
\newbox{\makecvtitlepicturebox}%
\savebox{\makecvtitlepicturebox}{%
\ifthenelse{\isundefined{\@photo}}%
{}%
{%
% \hspace*{\separatorcolumnwidth}%
\color{color1}%
\setlength{\fboxrule}{\@photoframewidth}%
\ifdim\@photoframewidth=0pt%
\setlength{\fboxsep}{0pt}\fi%
\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%
% name and title
\newlength{\makecvtitledetailswidth}\settowidth{\makecvtitledetailswidth}{\usebox{\makecvtitledetailsbox}}%
\newlength{\makecvtitlepicturewidth}\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
\ifthenelse{\lengthtest{\makecvtitlenamewidth=0pt}}% check for dummy value (equivalent to \ifdim\makecvtitlenamewidth=0pt)
{\setlength{\makecvtitlenamewidth}{\textwidth-\makecvtitlepicturewidth
}}%
{}%
% \begin{minipage}[b]{\makecvtitlenamewidth}%
\raggedright\namestyle{\@firstname\ \@familyname}\par\medskip%
\ifthenelse{\equal{\@title}{}}{}{{\centering\titlestyle{\@title}\par}\medskip}%
%\hfill%
% detailed information
%  \llap{
%
\usebox{\makecvtitledetailsbox}%
%\end{minipage}\ignorespaces%
%}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvtitlenamewidth is forced
% optional photo (rendering)
\usebox{\makecvtitlepicturebox}\\[2.5em]%
% optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
{{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
\par}% to avoid weird spacing bug at the first section if no blank line is left after \makecvtitle
\makeatother

\usepackage[scale=0.75]{geometry}
% personal data
\name{John}{Doe}
\phone[mobile]{+1~(234)~567~890}
\email{john@doe.org}
\photo[64pt][0.4pt]{picture}
\begin{document}
\makecvtitle

\section{Education}

\end{document}


with this result

but I'd like to put the picture little above and more on the right like in file without modification:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}

\usepackage[scale=0.75]{geometry}
% personal data
\name{John}{Doe}
\phone[mobile]{+1~(234)~567~890}
\email{john@doe.org}
\photo[64pt][0.4pt]{picture}
\begin{document}
\makecvtitle

\section{Education}

\end{document}


What am I supposed to do?

• Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – karlkoeller Dec 27 '13 at 19:39
• Does my answer solve your problem? – karlkoeller Dec 27 '13 at 23:44
• Yes, thank you very much :) and thanks for link to starter guide, surely will be helpful. – Transistorio Dec 28 '13 at 11:39
• Then remember that you can accept (and upvote) the answer. See How do you accept an answer? – karlkoeller Dec 28 '13 at 11:41

## Update (moderncv v2.0)

With moderncv v2.0, we have to completely redefine \makecvhead to achieve what you want, so add the following lines in your preamble:

\makeatletter
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputecvlengths%
% optional detailed information (pre-rendering)
\if@details%
\def\phonesdetails{}%
\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}}%
\def\socialsdetails{}%
\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}}%
\if@left\begin{tabular}[b]{@{}l@{}}\fi%
\if@right\begin{tabular}[b]{@{}l@{}}\fi%
\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
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%
\end{tabular}
}\fi%
% optional photo (pre-rendering)
\ifthenelse{\isundefined{\@photo}}%
{}%
{%
\if@left%
\hspace*{\separatorcolumnwidth}\fi%
\color{color1}%
\setlength{\fboxrule}{\@photoframewidth}%
\ifdim\@photoframewidth=0pt%
\setlength{\fboxsep}{0pt}\fi%
\framebox{\includegraphics[width=\@photowidth]{\@photo}}}%
\if@right%
\hspace*{\separatorcolumnwidth}\fi}%
% name and title (pre-rendering)
{}%
\if@left\raggedright\fi%
\if@right\raggedleft\fi%
\namestyle{\@firstname\ \@lastname}%
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
\end{minipage}}%
% rendering
\if@left%
\hfill%
\usebox{\makecvheaddetailsbox}\fi% \llap is used to suppress the width of the box, allowing overlap if the value of makecvheadnamewidth is forced
\if@right%
\rlap{\usebox{\makecvheaddetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvheadnamewidth is forced
\hfill%
\\[2.5em]%
% optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
{{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
\par}% to avoid weird spacing bug at the first section if no blank line is left after \makecvhead
\makeatother


Complete code:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}

\usepackage[scale=0.75]{geometry}
% personal data
\name{John}{Doe}
\phone[mobile]{+1~(234)~567~890}
\email{john@doe.org}
\photo[64pt][0.4pt]{picture}

\makeatletter
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputecvlengths%
% optional detailed information (pre-rendering)
\if@details%
\def\phonesdetails{}%
\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}}%
\def\socialsdetails{}%
\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}}%
\if@left\begin{tabular}[b]{@{}l@{}}\fi%
\if@right\begin{tabular}[b]{@{}l@{}}\fi%
\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
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%
\end{tabular}
}\fi%
% optional photo (pre-rendering)
\ifthenelse{\isundefined{\@photo}}%
{}%
{%
\if@left%
\hspace*{\separatorcolumnwidth}\fi%
\color{color1}%
\setlength{\fboxrule}{\@photoframewidth}%
\ifdim\@photoframewidth=0pt%
\setlength{\fboxsep}{0pt}\fi%
\framebox{\includegraphics[width=\@photowidth]{\@photo}}}%
\if@right%
\hspace*{\separatorcolumnwidth}\fi}%
% name and title (pre-rendering)
{}%
\if@left\raggedright\fi%
\if@right\raggedleft\fi%
\namestyle{\@firstname\ \@lastname}%
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
\end{minipage}}%
% rendering
\if@left%
\hfill%
\usebox{\makecvheaddetailsbox}\fi% \llap is used to suppress the width of the box, allowing overlap if the value of makecvheadnamewidth is forced
\if@right%
\rlap{\usebox{\makecvheaddetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvheadnamewidth is forced
\hfill%
\\[2.5em]%
% optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
{{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
\par}% to avoid weird spacing bug at the first section if no blank line is left after \makecvhead
\makeatother

\begin{document}
\makecvtitle

\section{Education}

\end{document}


## Original answer (works with older versions of moderncv)

With a little bit of hacking inside your code..., I've changed these lines

 % \begin{minipage}[b]{\makecvtitlenamewidth}%
\raggedright\namestyle{\@firstname\ \@familyname}\par\medskip%
\ifthenelse{\equal{\@title}{}}{}{{\centering\titlestyle{\@title}\par}\medskip}%
%\hfill%
% detailed information
%  \llap{
%
\usebox{\makecvtitledetailsbox}%
%\end{minipage}\ignorespaces%
%}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvtitlenamewidth is forced
% optional photo (rendering)
\usebox{\makecvtitlepicturebox}\\[2.5em]%


to

\begin{minipage}[b]{\makecvtitlenamewidth}
\raggedright\namestyle{\@firstname\ \@familyname}\par\medskip%
\ifthenelse{\equal{\@title}{}}{}{{\centering\titlestyle{\@title}\par}\medskip}%
%\hfill%
% detailed information
%  \llap{
%
\end{minipage}\hfill%
\raisebox{1em}{\usebox{\makecvtitlepicturebox}}\vspace{2.5em}%

\usebox{\makecvtitledetailsbox}%
%}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvtitlenamewidth is forced
% optional photo (rendering)


and the result is

Complete code:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}

\makeatletter
\renewcommand*{\makecvtitle}{%
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputecvlengths%
% optional detailed information box
\newbox{\makecvtitledetailsbox}%
\savebox{\makecvtitledetailsbox}{%
\begin{tabular}[b]{@{}p{10cm}@{}}%
\ifthenelse{\isundefined{\@mobile}}{}{\makenewline\mobilesymbol\@mobile} %
\end{tabular}
}%
% optional photo (pre-rendering)
\newbox{\makecvtitlepicturebox}%
\savebox{\makecvtitlepicturebox}{%
\ifthenelse{\isundefined{\@photo}}%
{}%
{%
% \hspace*{\separatorcolumnwidth}%
\color{color1}%
\setlength{\fboxrule}{\@photoframewidth}%
\ifdim\@photoframewidth=0pt%
\setlength{\fboxsep}{0pt}\fi%
\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%
% name and title
\newlength{\makecvtitledetailswidth}\settowidth{\makecvtitledetailswidth}{\usebox{\makecvtitledetailsbox}}%
\newlength{\makecvtitlepicturewidth}\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
\ifthenelse{\lengthtest{\makecvtitlenamewidth=0pt}}% check for dummy value (equivalent to \ifdim\makecvtitlenamewidth=0pt)
{\setlength{\makecvtitlenamewidth}{\textwidth-\makecvtitlepicturewidth
}}%
{}%
\begin{minipage}[b]{\makecvtitlenamewidth}
\raggedright\namestyle{\@firstname\ \@familyname}\par\medskip%
\ifthenelse{\equal{\@title}{}}{}{{\centering\titlestyle{\@title}\par}\medskip}%
%\hfill%
% detailed information
%  \llap{
%
\end{minipage}\hfill%
\raisebox{1em}{\usebox{\makecvtitlepicturebox}}\vspace{2.5em}%

\usebox{\makecvtitledetailsbox}%
%}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvtitlenamewidth is forced
% optional photo (rendering)
% optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
{{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
\par}% to avoid weird spacing bug at the first section if no blank line is left after \makecvtitle
\makeatother

\usepackage[scale=0.75]{geometry}
% personal data
\name{John}{Doe}