I like the moderncv
casual
theme, but I would like to change the order of the photo and the name / title.
I tried the solution described in this question:
! Undefined control sequence.
\maketitle ->{{\firstnamestyle
{\@firstname}~\familynamestyle {\@familyname}...
l.33 \maketitle
Example code:
\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}
Best Answer
One way to solve the problem, that class
moderncv
has changed could be the following MWE. The part after\AtBeginDocument
rewrites the original definition inmoderncv
.Please keep in mind: if the class
moderncv
is changed again, you may need to change your corrections again. Perhaps it would be a good idea to ask the author ofmoderncv
to integrate an option to change the position of name and picture.The changed MWE:
The result is:
Update to
moderncv
2.0.0:As already mentioned above class
moderncv
has changed and therefore you need the following code using class version2.0.0
.With the current version
moderncv 2015/07/28 v2.0.0 modern curriculum vitae and letter document class
you can define for stylecasual
with an additional option[left]
to get the name printed left, the image right in the title of the CV as wished in this question.Please see that there are new commands available to define phone numbers etc. and to add new infos like
linkedin
orgithub
...Please see the following MWE (new code marked with
<======
):Please see that line
\setlength{\footskip}{84pt}
is only needed because I added more personal infos into the footer. For your CV please do not add this line, compile and check the*.log
file for a warning, thatfootskip is too small.
use the rounded value given in that warning for your CV ...