Actualización a moderncv2.0.0:

Actualización a moderncv2.0.0:

Me gusta el moderncv casualtema, pero me gustaría cambiar el orden de la foto y el nombre/título.

Probé la solución descrita en esta pregunta:

Modificar el encabezado moderncv

! Undefined control sequence.
\maketitle ->{{\firstnamestyle 
                               {\@firstname}~\familynamestyle {\@familyname}...
l.33 \maketitle

Código de ejemplo:

\documentclass[11pt,a4paper]{moderncv}

% moderncv themes
\moderncvtheme[blue]{casual}
\AtBeginDocument
{
% reverse the name and photo
\makeatletter
% maketitle
\renewcommand*{\maketitle}{%
  {%
    {\firstnamestyle{\@firstname}~\familynamestyle{\@familyname}}}%
    \hfill%
    \ifthenelse{\isundefined{\@photo}}%
      {}%
      {{\color{firstnamecolor}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}\\[-.35em]}%
    {\color{firstnamecolor}\rule{\textwidth}{.25ex}\\[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 \maketitle
\makeatother
}

\firstname{John}
\familyname{Doe}
\title{Curriculum Vitae}    
\address{Example Street}{12345 Exampe Town}
\photo{picture}

\begin{document}
\maketitle
\end{document}

Respuesta1

Una forma de solucionar el problema de que la clase moderncvhaya cambiado podría ser el siguiente MWE. La parte posterior \AtBeginDocumentreescribe la definición original en moderncv.

Por favor ten en cuenta: si la clase moderncvcambia nuevamente, es posible que deba cambiar sus correcciones nuevamente. Quizás sería una buena idea pedirle al autor que moderncvintegre una opción para cambiar la posición del nombre y la imagen.

El MWE cambiado:

\documentclass[11pt,a4paper]{moderncv}

\moderncvstyle{casual}
\moderncvcolor{blue}

\firstname{John}
\familyname{Doe}
\title{Resumé title}
\address{street and number}{postcode city}
\mobile{+1~(234)~567~890}
\phone{+2~(345)~678~901}
\fax{+3~(456)~789~012}
\email{[email protected]}
\homepage{www.johndoe.com}
\extrainfo{additional information}
\photo[64pt][0.4pt]{picture}
\quote{Some quote}

\makeatletter
%\AtBeginDocument
%{
% reverse the name and photo
\renewcommand*{\makecvtitle}{%
  \recomputecvlengths%
  \makecvfooter%
  % define optional picture
  \newbox{\makecvtitlepicturebox}%
  \savebox{\makecvtitlepicturebox}{%
    \ifthenelse{\isundefined{\@photo}}%
      {
        \@initializelength{\makecvtitlepicturewidth}% Damit Länge bekannt bei Name
        \settowidth{\makecvtitlepicturewidth}{0pt}%
      }%
      {%
       \setlength\fboxrule{\@photoframewidth}%
       \ifdim\@photoframewidth=0pt%
         \setlength{\fboxsep}{0pt}\fi%
       {\color{color1}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}
        \@initializelength{\makecvtitlepicturewidth}% Damit Länge bekannt bei Name
        \settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
      }%
  % end define optional picture

  % name
%    \parbox[b]{\textwidth-\makecvtitlepicturewidth}{%
 {   \raggedright\namefont{\color{color2!50}\@firstname} {\color{color2}\@familyname}}%\lastname -> error
    \hfill\usebox{\makecvtitlepicturebox}%
%    \parbox[b]{\textwidth-\makecvtitlepicturewidth}{%
%   \raggedleft\namefont{\color{color2!50}\@firstname} {\color{color2}\@lastname}}%\familyname
\\[-.35em]%
  {\color{color2!50}\rule{\textwidth}{.25ex}}%
  % optional title
  \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\null\hfill\titlestyle{\@title}}\\[2.5em]% 
  % optional quote
  \ifthenelse{\isundefined{\@quote}}%
    {}%
    {{\null\hfill\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\hfill\null\\[2.5em]}}%
  \par}% 
%}% AtBeginDocument ende
\makeatother


\begin{document}
\makecvtitle

\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{ \textit{Grade} }{Description}  % arguments 3 to 6 can be left empty
\cvitem{title}{ \emph{Title} }
\cvitemwithcomment{Language 1}{Skill level}{Comment}
\cvdoubleitem{category X}{XXX, YYY, ZZZ}{category Y}{XXX, YYY, ZZZ}
\cvlistitem{Item 1}
\cvlistdoubleitem{Item 2}{Item 3}
\end{document}

El resultado es: Resultado de MWE

Actualización a moderncv2.0.0:

Como ya se mencionó anteriormente, la clase moderncvha cambiado y, por lo tanto, necesita el siguiente código usando la versión de clase 2.0.0.

Con la versión actual, moderncv 2015/07/28 v2.0.0 modern curriculum vitae and letter document classpuede definir el estilo casualcon una opción adicional [left]para que el nombre se imprima a la izquierda y la imagen a la derecha en el título del CV, como se desea en esta pregunta.

Tenga en cuenta que hay nuevos comandos disponibles para definir números de teléfono, etc. y para agregar nueva información como linkedino github...

Consulte el siguiente MWE (nuevo código marcado con <======):

\documentclass[11pt,a4paper]{moderncv}

\moderncvstyle[left]{casual} % <========================================
\moderncvcolor{blue}

\name{John}{Doe} % <====================================================
\title{Resumé title}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890} % <====================================
\phone[fixed]{+2~(345)~678~901} % <=====================================
\phone[fax]{+3~(456)~789~012} % <=======================================
\email{[email protected]}
\homepage{www.johndoe.com}
\social[linkedin]{john.doe} % <=========================================
\social[twitter]{jdoe} % <==============================================
\social[github]{jdoe} % <===============================================
\extrainfo{additional information}
\photo[64pt][0.4pt]{picture}
\quote{Some quote}

\setlength{\footskip}{84pt} % <=========================================


\begin{document}
\makecvtitle

\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{ \textit{Grade} }{Description}  % arguments 3 to 6 can be left empty
\cvitem{title}{ \emph{Title} }
\cvitemwithcomment{Language 1}{Skill level}{Comment}
\cvdoubleitem{category X}{XXX, YYY, ZZZ}{category Y}{XXX, YYY, ZZZ}
\cvlistitem{Item 1}
\cvlistdoubleitem{Item 2}{Item 3}
\end{document}

Tenga en cuenta que esa línea \setlength{\footskip}{84pt}solo es necesaria porque agregué más información personal en el pie de página. Para su CV, no agregue esta línea, compile y verifique el *.logarchivo para ver si hay una advertencia, que footskip is too small.use el valor redondeado proporcionado en esa advertencia para su CV...

Respuesta2

La versión actualizada de moderncv lo hace obsoleto; hay una opción incluida en el paquete para cambiar esto. cuando cargues el \moderncvstyle, incluye la opción [izquierda] así:

\moderncvstyle[left]{casual}

información relacionada