moderncv - cómo poner información personal bajo el nombre

moderncv - cómo poner información personal bajo el nombre

Soy nuevo en LaTeX y moderncv. Me gustaría poner mi información de contacto bajo el nombre pero no sé cómo. encontréeste problemaSimilar al mío, pero cambia la posición de la imagen. Este es mi .texarchivo después de la modificación:

\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}{%
    \addressfont\color{color2}%
    \begin{tabular}[b]{@{}p{10cm}@{}}%
      \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet %
        \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}} % if \addresstreet is defined, \addresscity will always be defined but could be empty
      \ifthenelse{\isundefined{\@mobile}}{}{\makenewline\mobilesymbol\@mobile} %
      \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
    \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}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\email{[email protected]}
\photo[64pt][0.4pt]{picture}
\begin{document}
\makecvtitle

\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}

\end{document}

con este resultado

ingrese la descripción de la imagen aquí

pero me gustaría poner la imagen un poco arriba y más a la derecha como en el archivo sin modificaciones:

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

\usepackage[scale=0.75]{geometry}
% personal data
\name{John}{Doe}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\email{[email protected]}
\photo[64pt][0.4pt]{picture}
\begin{document}
\makecvtitle

\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}

\end{document}

ingrese la descripción de la imagen aquí

¿Que se supone que haga?

Respuesta1

Actualización ( moderncvv2.0)

Con moderncvv2.0, tenemos que redefinir completamente \makecvheadpara lograr lo que queremos, así que agregue las siguientes líneas en su preámbulo:

\makeatletter
\renewcommand*{\makecvhead}{%
  % recompute lengths (in case we are switching from letter to resume, or vice versa)
  \recomputecvlengths%
  % optional detailed information (pre-rendering)
  \@initializebox{\makecvheaddetailsbox}%
  \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}}%
    \savebox{\makecvheaddetailsbox}{%
      \addressfont\color{color2}%
      \if@left\begin{tabular}[b]{@{}l@{}}\fi%
      \if@right\begin{tabular}[b]{@{}l@{}}\fi%
        \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
          \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
          \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
        \phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict
        \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
        \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
        \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)
  \@initializebox{\makecvheadpicturebox}%
  \savebox{\makecvheadpicturebox}{%
    \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)
  \@initializelength{\makecvheaddetailswidth}\settowidth{\makecvheaddetailswidth}{\usebox{\makecvheaddetailsbox}}%
  \@initializelength{\makecvheadpicturewidth}\settowidth{\makecvheadpicturewidth}{\usebox{\makecvheadpicturebox}}%
  \ifthenelse{\lengthtest{\makecvheadnamewidth=0pt}}% check for dummy value (equivalent to \ifdim\makecvheadnamewidth=0pt)
    {\setlength{\makecvheadnamewidth}{\textwidth-\makecvheaddetailswidth-\makecvheadpicturewidth}}%
    {}%
  \@initializebox{\makecvheadnamebox}%
  \savebox{\makecvheadnamebox}{%
    \begin{minipage}[b]{\makecvheadnamewidth}%
      \if@left\raggedright\fi%
      \if@right\raggedleft\fi%
      \namestyle{\@firstname\ \@lastname}%
      \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
    \end{minipage}}%
  % rendering
  \if@left%
    \usebox{\makecvheadnamebox}%
    \hfill%
    \usebox{\makecvheadpicturebox}\\[1.5em]%
    \usebox{\makecvheaddetailsbox}\fi% \llap is used to suppress the width of the box, allowing overlap if the value of makecvheadnamewidth is forced
  \if@right%
    \usebox{\makecvheadpicturebox}%
    \rlap{\usebox{\makecvheaddetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvheadnamewidth is forced
    \hfill%
    \usebox{\makecvheadnamebox}\fi%
  \\[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

Código completo:

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

\usepackage[scale=0.75]{geometry}
% personal data
\name{John}{Doe}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\email{[email protected]}
\photo[64pt][0.4pt]{picture}

\makeatletter
\renewcommand*{\makecvhead}{%
  % recompute lengths (in case we are switching from letter to resume, or vice versa)
  \recomputecvlengths%
  % optional detailed information (pre-rendering)
  \@initializebox{\makecvheaddetailsbox}%
  \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}}%
    \savebox{\makecvheaddetailsbox}{%
      \addressfont\color{color2}%
      \if@left\begin{tabular}[b]{@{}l@{}}\fi%
      \if@right\begin{tabular}[b]{@{}l@{}}\fi%
        \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
          \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
          \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
        \phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict
        \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
        \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
        \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)
  \@initializebox{\makecvheadpicturebox}%
  \savebox{\makecvheadpicturebox}{%
    \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)
  \@initializelength{\makecvheaddetailswidth}\settowidth{\makecvheaddetailswidth}{\usebox{\makecvheaddetailsbox}}%
  \@initializelength{\makecvheadpicturewidth}\settowidth{\makecvheadpicturewidth}{\usebox{\makecvheadpicturebox}}%
  \ifthenelse{\lengthtest{\makecvheadnamewidth=0pt}}% check for dummy value (equivalent to \ifdim\makecvheadnamewidth=0pt)
    {\setlength{\makecvheadnamewidth}{\textwidth-\makecvheaddetailswidth-\makecvheadpicturewidth}}%
    {}%
  \@initializebox{\makecvheadnamebox}%
  \savebox{\makecvheadnamebox}{%
    \begin{minipage}[b]{\makecvheadnamewidth}%
      \if@left\raggedright\fi%
      \if@right\raggedleft\fi%
      \namestyle{\@firstname\ \@lastname}%
      \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
    \end{minipage}}%
  % rendering
  \if@left%
    \usebox{\makecvheadnamebox}%
    \hfill%
    \usebox{\makecvheadpicturebox}\\[1.5em]%
    \usebox{\makecvheaddetailsbox}\fi% \llap is used to suppress the width of the box, allowing overlap if the value of makecvheadnamewidth is forced
  \if@right%
    \usebox{\makecvheadpicturebox}%
    \rlap{\usebox{\makecvheaddetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvheadnamewidth is forced
    \hfill%
    \usebox{\makecvheadnamebox}\fi%
  \\[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}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}

\end{document} 

Respuesta original (funciona con versiones anteriores de moderncv)

Con un poco de hackeo dentro de tu código..., he cambiado estas líneas

 % \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]%

a

\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)

y el resultado es

ingrese la descripción de la imagen aquí

Código completo:

\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}{%
    \addressfont\color{color2}%
    \begin{tabular}[b]{@{}p{10cm}@{}}%
      \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet %
        \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}} % if \addresstreet is defined, \addresscity will always be defined but could be empty
      \ifthenelse{\isundefined{\@mobile}}{}{\makenewline\mobilesymbol\@mobile} %
      \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
    \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}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\email{[email protected]}
\photo[64pt][0.4pt]{picture}
\begin{document}
\makecvtitle

\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}

\end{document} 

información relacionada