0

Hi, I would like to make some modifications in the CV header of moderncv, classic style, as here shown in this picture:

enter image description here

This is the code I used to produce that figure (without the red marks obviously!), but I am stuck.. Could you please help me?

\documentclass[11pt,a4paper,sans]{moderncv}   
\moderncvstyle{casual}   
\moderncvcolor{blue}   
\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}


% personal data
\name{John}{Doe}
\title{Resumé title}
\address{street, number}{postcode, city}{country}
\phone[mobile]{+1~(234)~567~890}
% \phone[fixed]{+2~(345)~678~901}
\email{[email protected]}
\homepage{www.johndoe.com}
\social[linkedin]{john.doe}
% \social[twitter]{jdoe}
% \social[github]{jdoe}
\extrainfo{additional information}
\photo[64pt][0.4pt]{example-image-a}
\quote{Some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, }


% https://tex.stackexchange.com/questions/353579/patchcmd-not-showing
\makeatletter
% phone definition (a bit messy... anything easier?)
\def\phonesdetails{}
\collectionloop{phones}
{
\protected@edef\phonesdetails
{\phonesdetails\protect\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem
}}
% social definition (a bit messy... anything easier?)
\def\socialsdetails{}
\collectionloop{socials}{
\protected@edef\socialsdetails{\socialsdetails\protect\makenewline\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem
}}
\patchcmd{\makecvhead}% <cmd> instead \makecvtitle
  {\framebox{\includegraphics[width=\@photowidth]{\@photo}}}% <search> 
  {\begin{tabular}[t]{@{}p{4cm}p{2cm}@{}}
      & 
      \raisebox{-\totalheight}{\includegraphics[width=\@photowidth]{\@photo}}
      \\
      \namefont{\color{color1}\@firstname{\color{color1}\@lastname}} & \\
      \namefont{\color{color2}\@title} &  \\
      \addresssymbol\@addressstreet & \phonesdetails \\ 
      \@addresscity & \emailsymbol\emaillink{\@email} \\
      \@addresscountry & \socialsdetails \\
  \end{tabular}%
  }% <replace>
  {}{}% <success><failure>
\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}

1 Answer 1

1

Maybe this code will put you on the right track.

x

% !TeX TS-program = pdflatex


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

\usepackage[scale=0.75]{geometry}
\usepackage{ragged2e} 
\setlength{\footskip}{60pt}  % added <<<<<<<<<<<<<<<

\makeatletter

\newlength{\leftside}
\renewcommand*{\makecvhead}{% changed <<<<<<<<<<<<<<<<<<<<<<
    \recomputecvlengths
    \def\phonesdetails{}
    \collectionloop{phones}{
        \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}}%
\setlength{\leftside}{0.95\textwidth-\@photowidth}
\begin{minipage}[b]{\leftside}{%
        \raggedright\namefont{\color{color2!50}\@firstname} {\color{color2}\@lastname}}
        \vspace{2em}\\
        \titlestyle{\@title}
        \vspace{2em}\\ 
        \addressfont\color{color2}
        \begin{tabular}{p{0.4\leftside}p{0.45\leftside}}
        \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet
            & 
            \phonesdetails 
            \\
            \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}
            &   
            \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}
            \\
            \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}
            &\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}
            \\
            \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo} & \socialsdetails
        \end{tabular}           
    \end{minipage}\hfill
    \begin{minipage}[c]{\@photowidth}{%
            \vfill          
            \includegraphics[width=\@photowidth]{\@photo}}
    \end{minipage}
    \vspace*{2em}\\
    \ifthenelse{\isundefined{\@quote}}%
    {}%
    {\begin{minipage}{%
            \quotewidth}\centering\quotestyle{\@quote}
    \end{minipage}\vspace*{2em}\\
    }%
    }% end makecvhead
\makeatother

\renewcommand*{\recomputecvheadlengths}{%
\setlength{\quotewidth}{\textwidth}}
\renewcommand*{\quotefont}{\large\slshape\justifying}
\renewcommand{\quotestyle}[1]{\quotefont\color{color1}#1}


% personal data
\name{John}{Doe}
\title{Resumé title}
\address{street, number}{postcode, city}{country}
\phone[mobile]{+1~(234)~567~890}
% \phone[fixed]{+2~(345)~678~901}
\email{[email protected]}
\homepage{www.johndoe.com}
\social[linkedin]{john.doe}
% \social[twitter]{jdoe}
% \social[github]{jdoe}
\extrainfo{additional information}
\photo[60pt][0.4pt]{example-image-a}
\quote{Some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, some long quote, }

\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}
1
  • AMAZING!!!!!! Many thanks !!! Perfect!
    – Ommo
    Feb 3, 2022 at 9:40

You must log in to answer this question.

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