2

enter image description here

Hi I would like to move the quote above so that it is aligned with the info given above and not starts as a separate paragraph. How do I do that? I use moderncv banking style.

\documentclass[11pt,a4paper,sans, dvipsnames]{moderncv}
\moderncvstyle{banking}                          
\moderncvcolor{blue}                               
\usepackage[scale=0.80]{geometry}


\begin{picture}(0,0)
\put(0,-90){\includegraphics[scale=0.55]{images/CV_image.jpg}}
\end{picture}

\patchcmd{\makehead}
  {\hfil}
  {\hspace*{0.2\textwidth}}
  {}
  {}
 
\name{Filip}{xxx}
\title{CV}                               
\address{ xxxxxxx 00, 0000 xxxxx  }{}{}
\quote{\small A data scientist with dedication for research and passion for its applications. }
\phone[mobile]{+41 1234567}                   
\email{xxx@gmail.com}                               

\begin{document}
\makecvhead
\end{document}
2

You need to patch \makehead to add there the quote like this:

\patchcmd{\makehead}
  {\ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}}
  {\ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}
   \flushmakeheaddetails\par\ifthenelse{\isundefined{\@quote}}{}%
    {{\begin{minipage}{0.4\textwidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
  }
  {}
  {}

Now we have to delete the quote from command \makecvhead like this:

\renewcommand*{\makecvhead}{% TODO: use \@initializecommand, which requires modifying its definition to handle \par
  % recompute lengths (in case we are switching from letter to resume, or vice versa)
  \recomputecvlengths%
  \makehead%
  }

With the following MWE you will get the wished result:

\documentclass[11pt,a4paper,sans, dvipsnames]{moderncv}
\moderncvstyle{banking} % head 3 body 3
\moderncvcolor{blue}                               
\usepackage[scale=0.80]{geometry}

\patchcmd{\makehead}
  {\hfil}
  {\hspace*{0.2\textwidth}}
  {}
  {}
  
\makeatletter % <=======================================================
\patchcmd{\makehead}
  {\ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}}
  {\ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}
   \flushmakeheaddetails\par\ifthenelse{\isundefined{\@quote}}{}%
    {{\begin{minipage}{0.4\textwidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
  }
  {}
  {}

\renewcommand*{\makecvhead}{% TODO: use \@initializecommand, which requires modifying its definition to handle \par
  % recompute lengths (in case we are switching from letter to resume, or vice versa)
  \recomputecvlengths%
  \makehead%
  }
\makeatother % <========================================================
 
\name{Filip}{xxx}
\title{CV}                               
\address{ xxxxxxx 00, 0000 xxxxx  }{}{}
\quote{\small A data scientist with dedication for research and passion for its applications. }
\phone[mobile]{+41 1234567}                   
\email{xxx@gmail.com}                               


\begin{document}

\begin{picture}(0,0)
\put(0,-90){\includegraphics[scale=0.55]{example-image}}
\end{picture}

\makecvhead
\end{document}

with the following result:

resulting pdf

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.