[Tex/LaTex] How to modifie title in moderncv style banking

cvheader-footermoderncvtitles

I have a problem with LaTeX and specifically the header of my cv. What I am using is the moderncv template with the banking option:

    \documentclass[11pt,a4paper,sans]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman

\moderncvstyle{banking} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{black} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
\usepackage{xpatch}
\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template
\usepackage{etoolbox}
\usepackage[scale=0.75]{geometry} % Reduce document margins
%\setlength{\hintscolumnwidth}{3cm} % Uncomment to change the width of the dates column
%\setlength{\makecvtitlenamewidth}{10cm} % For the 'classic' style, uncomment to adjust the width of the space allocated to your name


\usepackage{eso-pic}
\newcommand\AtPageUpperMyleft[1]{\AtPageUpperLeft{%
 \put(\LenToUnit{2.5cm},\LenToUnit{-5.5cm}){#1}%
 }}%

\AddToShipoutPictureBG*{%
\AtPageUpperMyleft{\fboxsep1.5pt\fcolorbox{white}{white}%
{\includegraphics[width=80pt,height=3cm,keepaspectratio]{pictures/giorgos}}}
}



\makeatletter

\xpatchcmd\makehead
   {\titlestyle{~|~\@title}}%
   {\par\vskip1ex\titlestyle{\@title}}%
   {}{}


\@ifpackageloaded{moderncvstylebanking}{%
\let\oldmakecvtitle\makecvtitle
\renewcommand*{\makecvtitle}{%
  {\par\vspace{10pt}}%
  \oldmakecvtitle%
}%
}{%
}
\makeatother


%----------------------------------------------------------------------------------------
%   NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------

\firstname{First name} 
\familyname{Last name} 
%\title{Curriculum vitae} 


\title{\Large{}\newline{}\vspace{-0.24cm}\newline{}Curriculum vitae}


\address{Adress XXX}{Cuntry,City Post Code}
\mobile{000123456789}
\email{JohndoeJohnDoe@outlook.com }
\homepage{nl.linkedin.com/pub/george-galatis/5a/16a/9a2/}{linkedin profile} 

% The first argument is the url for the clickable link, the second argument is the url displayed in the template - this allows special characters to be displayed such as the tilde in this example


%\extrainfo{additional information}

\photo[70pt][1pt]{pictures/giorgos} % The first bracket is the picture height, the second is the thickness of the frame around the picture (0pt for no frame)


%----------------------------------------------------------------------------------------

\begin{document}

\makecvtitle 
----------------------------------------------------
\section{Profile Summary}

\section{Work Experience}

\section{Education}

\section{Projects}

\section{Computer skills}

\section{Hobbies}


\end{document}

Though I would like to edit the title of the cv as following:

enter image description here

Any suggestions on how to accomplish this?

Best Answer

Based on your code you have to change two things in your title.

First you need to get right justified text with

\xpatchcmd\makehead
   {\centering}% <======================================================
   {}%
   {}{}

This patch (for version 2.0.0 of moderncv) simply delete the \centering command.

Second you need to move the title to the right. That can you do with reducing the width for the title with

\xpatchcmd\makehead
   {\setlength{\makeheaddetailswidth}{0.8\textwidth}}%
   {\setlength{\makeheaddetailswidth}{0.6\textwidth}}% <================
   {}{}

With the following MWE (please see that I used example-image from package mwe for the picture)

\documentclass[11pt,a4paper,sans]{moderncv}

\moderncvstyle{banking} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{black} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
\usepackage{xpatch}
\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template
\usepackage{etoolbox}
\usepackage[scale=0.75]{geometry} % Reduce document margins
%\setlength{\hintscolumnwidth}{3cm} % Uncomment to change the width of the dates column
%\setlength{\makecvtitlenamewidth}{10cm} % For the 'classic' style, uncomment to adjust the width of the space allocated to your name


\usepackage{eso-pic}
\newcommand\AtPageUpperMyleft[1]{\AtPageUpperLeft{%
 \put(\LenToUnit{2.5cm},\LenToUnit{-5.5cm}){#1}%
 }}%

\AddToShipoutPictureBG*{%
\AtPageUpperMyleft{\fboxsep1.5pt\fcolorbox{white}{white}%
{\includegraphics[width=80pt,height=3cm,keepaspectratio]{example-image}}}
}

\makeatletter

\xpatchcmd\makehead
   {\centering}% <======================================================
   {}%
   {}{}

\xpatchcmd\makehead
   {\titlestyle{~|~\@title}}%
   {\par\vskip1ex\titlestyle{\@title}}%
   {}{}

\xpatchcmd\makehead
   {\setlength{\makeheaddetailswidth}{0.8\textwidth}}%
   {\setlength{\makeheaddetailswidth}{0.6\textwidth}}% <================
   {}{}


\@ifpackageloaded{moderncvstylebanking}{%
\let\oldmakecvtitle\makecvtitle
\renewcommand*{\makecvtitle}{%
  {\par\vspace{10pt}}%
  \oldmakecvtitle%
}%
}{%
}
\makeatother


%----------------------------------------------------------------------------------------
%   NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------

\firstname{First name} 
\familyname{Last name} 
%\title{Curriculum vitae} 


\title{\Large{}Curriculum vitae} % <====================================
%\title{\Large{}\newline{}\vspace{-0.24cm}\newline{}Curriculum vitae}

\address{Adress XXX}{Cuntry,City Post Code}
\mobile{000123456789}
\email{JohndoeJohnDoe@outlook.com }
\homepage{nl.linkedin.com/pub/george-galatis/5a/16a/9a2/}%{linkedin profile} 

% The first argument is the url for the clickable link, the second argument is the url displayed in the template - this allows special characters to be displayed such as the tilde in this example


%\extrainfo{additional information}

\photo[70pt][1pt]{pictures/giorgos} % The first bracket is the picture height, the second is the thickness of the frame around the picture (0pt for no frame)


%----------------------------------------------------------------------------------------

\begin{document}

\makecvtitle 
----------------------------------------------------
\section{Profile Summary}

\section{Work Experience}

\section{Education}

\section{Projects}

\section{Computer skills}

\section{Hobbies}


\end{document}

you get the wished result:

enter image description here

But at last it would be better to rewrite the part for header creation to fit you purposes for example by using a tabular ...