2

In have used banking style in the moderncv class. I have modified things a bit. The code is so huge and messy that for me to provide the MWE would be impossible. In, the moderncvstylebanking.sty file, around line number 88 to 92, I have done changes to bring something like this :

How do I bring it completely to the left (removing the gap). The modified part of the code is:

  \raggedright
  \parbox{\maketitlewidth}{%
    % name and title
    \namestyle{\@firstname~\@familyname}%
    \ifthenelse{\isundefined{\@title}}{}{\titlestyle{\@title}}\\%
    % detailed information
    \addressfont\color{color2}%
    \ifthenelse{\isundefined{\@addressstreet}}

line 88-95.

2

You need to change three lines in the original definition of \flushmaketitle (in my example below the changes are marked using % ORIGINAL and % NEW):

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

\makeatletter
\renewcommand*{\flushmaketitle}{%
  \strut\usebox{\maketitlebox}%
  \savebox{\maketitlebox}{}%
  \savebox{\maketitletempbox}{}%
  \setlength{\maketitleboxwidth}{0pt}}
\renewcommand*{\maketitle}{%
%  \setlength{\maketitlewidth}{0.8\textwidth}% ORIGINAL
  \setlength{\maketitlewidth}{\textwidth}% NEW
  %\hfil% ORIGINAL
  \parbox{\maketitlewidth}{%
%    \centering% ORIGINAL
    \raggedright% NEW
    % name and title
    \namestyle{\@firstname~\@lastname}%
    \ifthenelse{\equal{\@title}{}}{}{\titlestyle{~|~\@title}}\\% \isundefined doesn't work on \@title, as LaTeX itself defines \@title (before it possibly gets redefined by \title) 
    % detailed information
    \addressfont\color{color2}%
    \ifthenelse{\isundefined{\@addressstreet}}{}{\addtomaketitle{\addresssymbol\@addressstreet}%
      \ifthenelse{\equal{\@addresscity}{}}{}{\addtomaketitle[~--~]{\@addresscity}}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
      \ifthenelse{\equal{\@addresscountry}{}}{}{\addtomaketitle[~--~]{\@addresscountry}}%
      \flushmaketitle\@firstmaketitleelementtrue\\}%
    \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
      \addtomaketitle{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
    \ifthenelse{\isundefined{\@email}}{}{\addtomaketitle{\emailsymbol\emaillink{\@email}}}%
    \ifthenelse{\isundefined{\@homepage}}{}{\addtomaketitle{\homepagesymbol\httplink{\@homepage}}}%
    \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
      \addtomaketitle{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
    \ifthenelse{\isundefined{\@extrainfo}}{}{\addtomaketitle{\@extrainfo}}%
    \flushmaketitle}\\[2.5em]}% need to force a \par after this to avoid weird spacing bug at the first section if no blank line is left after \maketitle
\makeatother


\name{John}{Doe}
\title{Resume title}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{john@doe.org}
\homepage{www.johndoe.com}
\quote{Some quote}

\begin{document}
\makecvtitle

\section{A test section}
Some test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text
\end{document}

enter image description here

If you also want the quote to be flushed, you'll need also a redefinition of \makecvtitle; something like

\renewcommand*{\makecvtitle}{%
  % recompute lengths (in case we are switching from letter to resume, or vice versa)
  \recomputecvlengths%
  \maketitle%
  % optional quote
  \ifthenelse{\isundefined{\@quote}}%
    {}%
    {{\begin{minipage}{\quotewidth}\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
  \par}% to avoid weird spacing bug at the first section if no blank line is left after \maketitle}
5
  • I dont want to have a title so removed it Apr 24 '14 at 17:02
  • What is the command to move to left or right? \raggedleft doesn't work here because personal details I will have some details on left and some details on right Apr 24 '14 at 17:03
  • 1
    @subhamsoni as usual, without the code you are using is almost impossible to provide effective help. Apr 24 '14 at 17:10
  • ok.... I will post another question, maybe tomorrow Apr 24 '14 at 17:14
  • 1
    @subhamsoni OK. Seems like the best thing to do :) Apr 24 '14 at 17:16

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.