Is there a possibility to change the order of photo and name in the moderncv class using \moderncvtheme[blue]{casual}?

Right now it looks like this:

PHOTOPHOTO
PHOTOPHOTO
PHOTOPHOTO
PHOTOPHOTO
PHOTOPHOTO                      FirstName LastName
__________________________________________________

But actually I want it to look like this:

                                        PHOTOPHOTO
PHOTOPHOTO
PHOTOPHOTO
PHOTOPHOTO
FirstName LastName                      PHOTOPHOTO
__________________________________________________

How can I do that?

-

You just need to change the \maketitle command:

% 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


The hardest part is determining where to put this block of code. The \maketitle command is defined not in moderncv.cls, but in the theme (package) file such as moderncvthemecasual.sty. Moreover, the implementation of \moderncvtheme makes sure that this theme package is not loaded until the end of the preamble.

So if you want to do this once, put it in your cv TeX file, but it has to be expanded after \begin{document} and before \maketitle. The best way to do this is to surround the block above with \AtBeginDocument{...} in the preamble, after \moderncvtheme[blue]{casual}.

If you want to do this more than once, you could copy the file moderncvthemecasual.sty and add a package option. If this is beyond your expertise you may want to email the developers and see if they'll consider it.

-
Using \AtBeginDocument{\makeatletter\renewcommand*{\maketitle}{...}\makeatother} you can still put your code in the preamble. –  Gonzalo Medina Nov 18 '11 at 23:34
@GonzaloMedina: you are right, and that's a better answer. I've edited. –  Matthew Leingang Feb 27 '13 at 2:43
Package moderncv has changed. To solve this problem now there is another fix needed. For one possible solution see question moderncv casual header photo right, title on the left. –  Kurt Apr 2 '13 at 18:30

I don't know if you really need to do all that trouble. Maybe you just want to use the classic theme that moderncv provides. So you can try to use

\moderncv[blue]{classic}


\moderncv[blue]{casual}

The classic theme does place the photo on the right. I have summed up some information on the moderncv package at Moderncv LaTeX package. A really easy way to create a modern CV.