1

I'm using Gonzalo Medina's answer in this question:

Questions about my cv header and cover letter

and the code is reproduced as follows:

\documentclass[11pt,a4paper]{moderncv}
\moderncvtheme[green]{classic}                  
\usepackage[utf8]{inputenc}                  
\usepackage{floatflt}
\usepackage{fancyhdr} 
\usepackage{geometry}
\geometry{a4paper,left=2cm,right=1cm, top=2cm, bottom=1.5cm,headheight=21pt} 
\usepackage{tikz} 
\usepackage{wrapfig}
\usepackage{lipsum} 

% Suppress final dot in \cventry
\renewcommand*\cventry[7][.25em]{%
  \cvitem[#1]{#2}{%
    {\bfseries#3}%
    \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
    \ifthenelse{\equal{#5}{}}{}{, #5}%
    \ifthenelse{\equal{#6}{}}{}{, #6}%
    \strut%
    \ifx&#7&%
      \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}

% New page style
\fancypagestyle{myfancy}{
\fancyhead[L]{\parbox[t]{.3333\textwidth}{\sffamily\footnotesize
  Address Line 1\\Address Line 2}}
\fancyhead[C]{\parbox[t]{.3333\textwidth}{\fixedphonesymbol\sffamily\footnotesize  555-123-456-789}}
\fancyhead[R]{\parbox[t]{.3333\textwidth}{\emailsymbol\sffamily\footnotesize  abcd@tex.stackexchange.com}}
}
\makeatletter
\let\ps@plain\ps@myfancy
\let\ps@empty\ps@myfancy
\makeatother
\pagestyle{myfancy}

% Redefinitions of \makecvtitle, opening and closing to
% have the desired formatting for first and family names
\makeatletter
\renewcommand*{\makecvtitle}{%
  % recompute lengths (in case we are switching from letter to resume, or vice versa)
  \recomputecvlengths%
  % optional detailed information (pre-rendering)
  \def\phonesdetails{}%
  \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
    \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}}%
  \newbox{\makecvtitledetailsbox}%
  \savebox{\makecvtitledetailsbox}{%
    \addressfont\color{color2}%
    \begin{tabular}[b]{@{}r@{}}%
      \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
        \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
        \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
      \phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict
      \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
      \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
      \socialsdetails% needs to be pre-rendered as loops and tabulars seem to conflict
      \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%
    \end{tabular}
  }%
  % optional photo (pre-rendering)
  \newbox{\makecvtitlepicturebox}%
  \savebox{\makecvtitlepicturebox}{%
    \ifthenelse{\isundefined{\@photo}}%
    {}%
    {%
      \hspace*{\separatorcolumnwidth}%
      \color{color1}%
      \setlength{\fboxrule}{\@photoframewidth}%
      \ifdim\@photoframewidth=0pt%
        \setlength{\fboxsep}{0pt}\fi%
      \framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%
  % name and title
  \newlength{\makecvtitledetailswidth}\settowidth{\makecvtitledetailswidth}{\usebox{\makecvtitledetailsbox}}%
  \newlength{\makecvtitlepicturewidth}\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
  \ifthenelse{\lengthtest{\makecvtitlenamewidth=0pt}}% check for dummy value (equivalent to \ifdim\makecvtitlenamewidth=0pt)
    {\setlength{\makecvtitlenamewidth}{\textwidth-\makecvtitledetailswidth-\makecvtitlepicturewidth}}%
    {}%
  \begin{minipage}[b]{\makecvtitlenamewidth}%
    \namestyle{\@firstname}\par\smallskip\namestyle{\@lastname}%
    \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
  \end{minipage}%
  \hfill%
  % optional detailed information (rendering)
  \llap{\usebox{\makecvtitledetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvtitlenamewidth is forced
  % optional photo (rendering)
  \usebox{\makecvtitlepicturebox}\\[2.5em]%
  % optional quote
  \ifthenelse{\isundefined{\@quote}}%
    {}%
    {{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
  \par}% to avoid weird spacing bug at the first section if no blank line is left after \makecvtitle
\renewcommand*{\makeletterclosing}{
  \@closing\\[3em]%
  {\bfseries\@firstname\\\@lastname}%
  \ifthenelse{\isundefined{\@enclosure}}{}{%
    \\%
    \vfill%
    {\color{color2}\itshape\enclname: \@enclosure}}}
\renewcommand*{\makelettertitle}{%
  % recompute lengths (in case we are switching from letter to resume, or vice versa)
  \recomputeletterlengths%
  % sender contact info
  \hfill%
  \begin{minipage}{.5\textwidth}%
    \raggedleft%
    \addressfont\textcolor{color2}{%
      {\bfseries\upshape\@firstname\\\@lastname}\@firstdetailselementfalse%
      \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
        \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
        \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
      \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
        \makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
      \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
      \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
      \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}%
    \end{minipage}\\[1em]
  % recipient block
  \begin{minipage}[t]{.5\textwidth}
    \raggedright%
    \addressfont%
    {\bfseries\upshape\@recipientname}\\%
    \@recipientaddress%
  \end{minipage}
  % date
  \hfill% US style
%  \\[1em]% UK style
  \@date\\[2em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900"
  % opening
  \raggedright%
  \@opening\\[1.5em]%
  % ensure no extra spacing after \makelettertitle due to a possible blank line
%  \ignorespacesafterend% not working
  \hspace{0pt}\par\vspace{-\baselineskip}\vspace{-\parskip}}

\makeatother

\makeatletter
\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
\makeatother

\firstname{Prename}
\familyname{Surname}
\title{Curriculum vitae}              
\address{}{}  
\photo[128pt]{picture}                        

\begin{document}

\makecvtitle
born 99.11.999 in smallcity

\section{school education}

\cventry{1996- 2008}{Abitur}{School City}{}{}{grade: x,x}  
\cventry{1996--2000}{elementary school}{}{}{}{Grundschule somewhere}
\section{studies}

\cventry{02.10.2011-- today}{matriculation Master of Science in xxx}{}{}{}{Joint Masters Program in whatever}
\cventry{07.04.2011}{finishing of Bachelor studies}{}{}{}{grade: x,x title: Bachelor of Science whatever}
\cventry{02.12.2010-01.02.2011}{student assistant}{}{}{}{Chair of xxx  Prof. Dr. xxx \newline student assistant as a tutor of xxx}
\cventry{21.07.2008--29.09.2011}{matriculation Bachelor of Science xxx}{}{}{}{university of xxx}
\section{Bachelor thesis}
\cvline{title}{\emph{Here comes a long title}}
\cvline{supervisor}{Prof. Dr. xxxxx}
\cvline{date}{february 2011}
\cvline{grade}{1.0}

\section{languages}
\cvlanguage{german}{mother tongue}{}
\cvlanguage{english}{fluent}{}

\section{technical knowledge}

\cvline{basic}{Stata, SPSS}
\cvline{expert}{R}

\cvline{miscellaneous}{LaTex, Microsoft Office, Microsoft Dynamics} 


\clearpage

\begin{tikzpicture}[remember picture,overlay]
\draw[color1,line width=10pt] 
  ([yshift=-55pt]current page.north west) -- +(14cm,0pt);
\end{tikzpicture}
\recipient{HR Departmnet}{Corporation\\123 Pleasant Lane\\12345 City, State} 
\date{\today} 
\opening{Dear Sir or Madam,} 
\closing{Sincerely yours,} 
\enclosure[Attached]{curriculum vit\ae{}} 

\makelettertitle 

\lipsum[1-3] 

\makeletterclosing

\end{document}

I am trying to change the address field so that it shows my name, street, suburb, city, country all on separate lines. I know that I have to change these blocks of code, but how?

\begin{tabular}[b]{@{}r@{}}%
    \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
    \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
    \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
  \phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict
  \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
  \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
  \socialsdetails% needs to be pre-rendered as loops and tabulars seem to conflict
  \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%
\end{tabular}

and

  \begin{minipage}{.5\textwidth}%
    \raggedleft%
    \addressfont\textcolor{color2}{%
      {\bfseries\upshape\@firstname {} \@lastname}\@firstdetailselementfalse%
      \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
        \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
        \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
      \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
        \makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
      \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
      \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
      \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}%
    \end{minipage}\\[1em]

I've tried doing it the logical way and added

\ifthenelse{\equal{\@addresssuburb}}{}{\makenewline\@addresssuburb%

between the lines related to street and city, but I get an error:

File ended while scanning use of \@argdef

(Am I just being dumb?) The idea is to put \address{street name}{suburb}{city}{country} in the document body so that my name, street, suburb, city, country would be shown on the top right-hand side of the first page of the cover letter and cv.

  • Is there any news here? – Johannes_B May 1 '16 at 15:48
2

It seems that you are using an older version of class moderncv. You used the command \makecvtitlenamewidth that has been renamed with current version 2.0.0 of moderncv to \makecvheadnamewidth.

You can add an new definiton of \makecvtitlenamewidth (see line 91 in the following MWE, important changes marked with <=====) or you have to rename all \makecvtitlenamewidth to \makecvheadnamewidth:

\newlength{\makecvtitlenamewidth}{\setlength{\makecvtitlenamewidth}{0pt}} % <======= line 91 ======================

Then you have to add the using od the new optional parameter {suburb} for \address:

\address{street and number}{suburb}{postcode city}{country} % <======== line 161 ===================

and of course you have to change the definition of the command \address that your new parameter suburb can be used:

\makeatletter % <======= line 42 ========================================
\RenewDocumentCommand{\address}{mG{}G{}G{}}{\def\@addressstreet{#1}\def\@addresssuburb{#2}\def\@addresscity{#3}\def\@addresscountry{#4}}
\makeatother

(the commands are needed here because of the use of @ in the names of variables).

At last you have to change the output of the adrress for cv:

    \begin{tabular}[b]{@{}r@{}}% <====== line 62 =======================
      \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
        \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
        \ifthenelse{\equal{\@addresssuburb}{}}{}{\makenewline\@addresssuburb}% <======================
        \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
      \phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict
      \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
      \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
      \socialsdetails% needs to be pre-rendered as loops and tabulars seem to conflict
      \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%
    \end{tabular}%
  }%

and the letter:

  \begin{minipage}{.5\textwidth}% <============= line 121 ==============
    \raggedleft%
    \addressfont\textcolor{color2}{%
      {\bfseries\upshape\@firstname\\\@lastname}\@firstdetailselementfalse%
      \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
        \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
        \ifthenelse{\equal{\@addresssuburb}{}}{}{\makenewline\@addresssuburb}% <======================
        \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
      \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
        \makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
      \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
      \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
      \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}%
    \end{minipage}\\[1em]

If you want to change the order of city and suburb just change the variables \@addresscity and \@addresssuburb.

So with the complete MWE for the current version 2.0.0 of moderncv

\documentclass[11pt,a4paper]{moderncv} 

\moderncvtheme[green]{classic}

\usepackage[utf8]{inputenc}

\usepackage{fancyhdr} 
\usepackage{geometry}
\geometry{a4paper,left=2cm,right=1cm, top=2cm, bottom=1.5cm,headheight=21pt} 

\usepackage{lipsum} 

% Suppress final dot in \cventry
\renewcommand*\cventry[7][.25em]{%
  \cvitem[#1]{#2}{%
    {\bfseries#3}%
    \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
    \ifthenelse{\equal{#5}{}}{}{, #5}%
    \ifthenelse{\equal{#6}{}}{}{, #6}%
    \strut%
    \ifx&#7&%
      \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}

% New page style
\fancypagestyle{myfancy}{
\fancyhead[L]{\parbox[t]{.3333\textwidth}{\sffamily\footnotesize
  Address Line 1\\Address Line 2}}
\fancyhead[C]{\parbox[t]{.3333\textwidth}{\fixedphonesymbol\sffamily\footnotesize  555-123-456-789}}
\fancyhead[R]{\parbox[t]{.3333\textwidth}{\emailsymbol\sffamily\footnotesize  abcd@tex.stackexchange.com}}
}
\makeatletter
\let\ps@plain\ps@myfancy
\let\ps@empty\ps@myfancy
\makeatother
\pagestyle{myfancy}

% defines one's address (optional)
% usage: \address{<street>}{<city>}{<country>}
%\address{street and number}{suburb}{postcode city}{country}
% where the <city> and <country> arguments can be omitted or provided empty
\makeatletter
\RenewDocumentCommand{\address}{mG{}G{}G{}}{\def\@addressstreet{#1}\def\@addresssuburb{#2}\def\@addresscity{#3}\def\@addresscountry{#4}}
\makeatother

% Redefinitions of \makecvtitle, opening and closing to
% have the desired formatting for first and family names
\makeatletter
\renewcommand*{\makecvtitle}{%
  % recompute lengths (in case we are switching from letter to resume, or vice versa)
  \recomputecvlengths%
  % optional detailed information (pre-rendering)
  \def\phonesdetails{}%
  \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
    \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}}%
  \newbox{\makecvtitledetailsbox}%
  \savebox{\makecvtitledetailsbox}{%
    \addressfont\color{color2}%
    \begin{tabular}[b]{@{}r@{}}% <====== line 62 =======================
      \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
        \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
        \ifthenelse{\equal{\@addresssuburb}{}}{}{\makenewline\@addresssuburb}% <======================
        \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
      \phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict
      \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
      \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
      \socialsdetails% needs to be pre-rendered as loops and tabulars seem to conflict
      \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%
    \end{tabular}%
  }%
  % optional photo (pre-rendering)
  \newbox{\makecvtitlepicturebox}%
  \savebox{\makecvtitlepicturebox}{%
    \ifthenelse{\isundefined{\@photo}}%
    {}%
    {%
      \hspace*{\separatorcolumnwidth}%
      \color{color1}%
      \setlength{\fboxrule}{\@photoframewidth}%
      \ifdim\@photoframewidth=0pt%
        \setlength{\fboxsep}{0pt}\fi%
      \framebox{\includegraphics[width=\@photowidth]{\@photo}}%
    }%
  }%
  % name and title
  \newlength{\makecvtitledetailswidth}\settowidth{\makecvtitledetailswidth}{\usebox{\makecvtitledetailsbox}}%
  \newlength{\makecvtitlepicturewidth}\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
  \newlength{\makecvtitlenamewidth}{\setlength{\makecvtitlenamewidth}{0pt}} % <======= line 91 ======================
  \ifthenelse{\lengthtest{\makecvtitlenamewidth=0pt}}% check for dummy value (equivalent to \ifdim\makecvtitlenamewidth=0pt)
    {\setlength{\makecvtitlenamewidth}{\textwidth-\makecvtitledetailswidth-\makecvtitlepicturewidth}}%
    {}%
  \begin{minipage}[b]{\makecvtitlenamewidth}%
    \namestyle{\@firstname}\par\smallskip\namestyle{\@lastname}%
    \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
  \end{minipage}%
  \hfill%
  % optional detailed information (rendering)
  \llap{\usebox{\makecvtitledetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvtitlenamewidth is forced
  % optional photo (rendering)
  \usebox{\makecvtitlepicturebox}\\[2.5em]%
  % optional quote
  \ifthenelse{\isundefined{\@quote}}%
    {}%
    {{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
  \par}% to avoid weird spacing bug at the first section if no blank line is left after \makecvtitle
\renewcommand*{\makeletterclosing}{
  \@closing\\[3em]%
  {\bfseries\@firstname\\\@lastname}%
  \ifthenelse{\isundefined{\@enclosure}}{}{%
    \\%
    \vfill%
    {\color{color2}\itshape\enclname: \@enclosure}}}
\renewcommand*{\makelettertitle}{%
  % recompute lengths (in case we are switching from letter to resume, or vice versa)
  \recomputeletterlengths%
  % sender contact info
  \hfill%
  \begin{minipage}{.5\textwidth}% <============= line 121 ==============
    \raggedleft%
    \addressfont\textcolor{color2}{%
      {\bfseries\upshape\@firstname\\\@lastname}\@firstdetailselementfalse%
      \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
        \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
        \ifthenelse{\equal{\@addresssuburb}{}}{}{\makenewline\@addresssuburb}% <======================
        \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
      \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
        \makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
      \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
      \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
      \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}%
    \end{minipage}\\[1em]
  % recipient block
  \begin{minipage}[t]{.5\textwidth}
    \raggedright%
    \addressfont%
    {\bfseries\upshape\@recipientname}\\%
    \@recipientaddress%
  \end{minipage}
  % date
  \hfill% US style
%  \\[1em]% UK style
  \@date\\[2em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900"
  % opening
  \raggedright%
  \@opening\\[1.5em]%
  % ensure no extra spacing after \makelettertitle due to a possible blank line
%  \ignorespacesafterend% not working
  \hspace{0pt}\par\vspace{-\baselineskip}\vspace{-\parskip}}
\makeatother

\makeatletter
\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
\makeatother

\firstname{Prename}
\familyname{Surname}
\title{Curriculum vitae}              
\address{street and number}{suburb}{postcode city}{country} % <======== line 161 ===================
\photo[128pt]{example-image-a}


\begin{document}

\makecvtitle 

born 99.11.999 in smallcity

\section{school education}

\cventry{1996- 2008}{Abitur}{School City}{}{}{grade: x,x}  
\cventry{1996--2000}{elementary school}{}{}{}{Grundschule somewhere}
\section{studies}

\cventry{02.10.2011-- today}{matriculation Master of Science in xxx}{}{}{}{Joint Masters Program in whatever}
\cventry{07.04.2011}{finishing of Bachelor studies}{}{}{}{grade: x,x title: Bachelor of Science whatever}
\cventry{02.12.2010-01.02.2011}{student assistant}{}{}{}{Chair of xxx  Prof. Dr. xxx \newline student assistant as a tutor of xxx}
\cventry{21.07.2008--29.09.2011}{matriculation Bachelor of Science xxx}{}{}{}{university of xxx}
\section{Bachelor thesis}
\cvline{title}{\emph{Here comes a long title}}
\cvline{supervisor}{Prof. Dr. xxxxx}
\cvline{date}{february 2011}
\cvline{grade}{1.0}

\section{languages}
\cvlanguage{german}{mother tongue}{}
\cvlanguage{english}{fluent}{}

\section{technical knowledge}

\cvline{basic}{Stata, SPSS}
\cvline{expert}{R}

\cvline{miscellaneous}{LaTex, Microsoft Office, Microsoft Dynamics} 


\clearpage

\begin{tikzpicture}[remember picture,overlay]
\draw[color1,line width=10pt] 
  ([yshift=-55pt]current page.north west) -- +(14cm,0pt);
\end{tikzpicture}
\recipient{HR Departmnet}{Corporation\\123 Pleasant Lane\\12345 City, State} 
\date{\today} 
\opening{Dear Sir or Madam,} 
\closing{Sincerely yours,} 
\enclosure[Attached]{curriculum vit\ae{}} 

\makelettertitle 

\lipsum[1-3] 

\makeletterclosing

\end{document}

you get the wished result:

enter image description here

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.