1

I found a screenshot of a cv that is obviously an adaption of the moderncv class with casualsettings: desired cv style

The two differences to the normal casualsetting are that the photo is below the name and title, instead of the left upper corner. Furthermore the title 'curriculum vitae' has a different position. While I managed to shift the title to the left, I still cannot figure out how to move the photo.

Can you help me to adapt the moderncvclass example to look like depicted in the picture? Thanks a lot in advance! (I left out shifting the title to the left in the MWE, for simplicity)

MWE:

\documentclass[11pt,a4paper,roman]{moderncv}        
\moderncvstyle{casual}                             
\moderncvcolor{blue}                              
\usepackage[scale=0.75]{geometry}       
\name{John}{Doe}
%\title{Curriculum Vitae} % Commented it out, as most important step would be photo   
\photo[80pt][0.4pt]{foto.png}
% document                         
\begin{document}
\makecvtitle
\section{Personal Data}
\cvitem{Name}{John}
\cvitem{Surname}{Doe}
\cvitem{...}{...}

\end{document}
0

1 Answer 1

5
\documentclass[11pt,a4paper,roman]{moderncv}        
% moderncv themes
\moderncvstyle{casual}                             
\moderncvcolor{blue}                              
\usepackage[scale=0.75]{geometry}       
\name{John}{Doe}
\title{Curriculum Vitae}   
\photo[80pt][0.4pt]{example-image-A}
%%%%%% The following passage moves 'Curriculum Vitae' from right to left:
\renewcommand*{\titlefont}{\LARGE\mdseries\upshape}
\makeatletter
\renewcommand*{\makecvtitle}{%
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputecvlengths%
% ensure footer with personal information
\makecvfoot%
% optional picture
\newbox{\makecvtitlepicturebox}%
\savebox{\makecvtitlepicturebox}{%
\ifthenelse{\isundefined{\@photo}}%
  {}%
  {%
   \setlength\fboxrule{\@photoframewidth}%
   \ifdim\@photoframewidth=0pt%
     \setlength{\fboxsep}{0pt}\fi%
    {\color{color1}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}}%
\hfill%\usebox{\makecvtitlepicturebox}%
% name
\@initializelength{\makecvtitlepicturewidth}%
\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
\parbox[b]{\textwidth-\makecvtitlepicturewidth}{%
 \raggedleft\namefont{\color{color2!50}\@firstname} {\color{color2}\@familyname}}\\        [-.35em]% 
{\color{color2!50}\rule{\textwidth}{.25ex}}%
% optional title
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\null\titlestyle{\@title}}
\hfill\smash{\raisebox{\dimexpr-\ht\makecvtitlepicturebox+\baselineskip\relax}{%
  \usebox{\makecvtitlepicturebox}}}\\[2.5em]  % optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
{{\null\hfill\begin{minipage}   {\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\hfill\null\\[2.5em]}}%
\par}%
\makeatother
%%%%%%% End of passage

% document                         
\begin{document}
\makecvtitle
\section{Personal Data}
\cvitem{Name}{John}
\cvitem{Surname}{Doe}
\cvitem{...}{...}

\end{document}

enter image description here

I'm not sure how much font matching you wanted to the image you were showing, but here are a few other possible changes:

enter image description here

which is obtained with

\documentclass[11pt,a4paper,roman]{moderncv}        
% moderncv themes
\moderncvstyle{casual}                             
\moderncvcolor{blue}                              
\usepackage[scale=0.75]{geometry}       
\name{John}{Doe}
\title{\textsf{\textit{Curriculum Vitae}}}   
\photo[80pt][0.4pt]{example-image-A}
%%%%%% The following passage moves 'Curriculum Vitae' from right to left:
\renewcommand*{\titlefont}{\LARGE\mdseries\upshape}
\makeatletter
\renewcommand*{\makecvtitle}{%
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputecvlengths%
% ensure footer with personal information
\makecvfoot%
% optional picture
\newbox{\makecvtitlepicturebox}%
\savebox{\makecvtitlepicturebox}{%
\ifthenelse{\isundefined{\@photo}}%
  {}%
  {%
   \setlength\fboxrule{\@photoframewidth}%
   \ifdim\@photoframewidth=0pt%
     \setlength{\fboxsep}{0pt}\fi%
    {\color{color1}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}}%
\hfill%\usebox{\makecvtitlepicturebox}%
% name
\@initializelength{\makecvtitlepicturewidth}%
\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
\parbox[b]{\textwidth-\makecvtitlepicturewidth}{%
 \raggedleft\namefont{\color{color2!50}\textsf{\@firstname}} {%
  \color{color2}\textsf{\@familyname}}}\\        [-.35em]% 
{\color{color2!50}\rule{\textwidth}{.25ex}}%
% optional title
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\null\titlestyle{\@title}}
\hfill\smash{\raisebox{\dimexpr-\ht\makecvtitlepicturebox+\baselineskip\relax}{%
  \usebox{\makecvtitlepicturebox}}}\\[0.5em]  % optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
{{\null\hfill\begin{minipage}   {\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\hfill\null\\[2.5em]}}%
\par}%
\makeatother
%%%%%%% End of passage

% document                         
\begin{document}
\makecvtitle
\section{Personal Data}
\cvitem{Name}{John}
\cvitem{Surname}{Doe}
\cvitem{...}{...}

\end{document}
11
  • Wow thank you, that is exactly what I was looking for! :) Turned out that the cv looks better without the 'curriculum vitae' title. Anybody who wants to do that can simply write \title{~} (if you comment it out, this example does not work any more) Anyway thank you, my cv is almost done and looks really good!
    – Ronin100
    Mar 27, 2015 at 19:16
  • @Ronin100 I'm happy it works for you. If you like this answer, you can click the check mark to the left of it, indicating that you accept it as the best answer to your question. Mar 27, 2015 at 19:19
  • I see. I will do that
    – Ronin100
    Mar 27, 2015 at 19:33
  • 1
    These examples did not work out-of-the-box for me, I needed to change \makecvfooter to \makecvfoot, see here Jun 7, 2017 at 21:16
  • 1
    @DominikusK. Thanks for that note. I guess the document class format changed in the last 2 years. I have revised the code to reflect it. Jun 8, 2017 at 0:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .