![重新审视“关于我的简历和求职信的问题”,更改地址中的行数](https://linux22.com/image/280932/%E9%87%8D%E6%96%B0%E5%AE%A1%E8%A7%86%E2%80%9C%E5%85%B3%E4%BA%8E%E6%88%91%E7%9A%84%E7%AE%80%E5%8E%86%E5%92%8C%E6%B1%82%E8%81%8C%E4%BF%A1%E7%9A%84%E9%97%AE%E9%A2%98%E2%80%9D%EF%BC%8C%E6%9B%B4%E6%94%B9%E5%9C%B0%E5%9D%80%E4%B8%AD%E7%9A%84%E8%A1%8C%E6%95%B0.png)
我在这个问题中使用了 Gonzalo Medina 的答案:
代码如下:
\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&%
\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 [email protected]}}
}
\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}
我正在尝试更改地址字段,以便它在单独的行上显示我的名字、街道、郊区、城市、国家。我知道我必须更改这些代码块,但该怎么做呢?
\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}
和
\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]
我尝试以合乎逻辑的方式进行操作,并添加了
\ifthenelse{\equal{\@addresssuburb}}{}{\makenewline\@addresssuburb%
在与街道和城市相关的行之间,但是我收到一个错误:
File ended while scanning use of \@argdef
(我是不是太笨了?)我的想法是将其放入\address{street name}{suburb}{city}{country}
文档正文中,以便我的姓名、街道、郊区、城市、国家显示在求职信和简历第一页的右上角。
答案1
看来您正在使用旧版本的类。您使用了已重命名为当前版本 2.0.0的moderncv
命令。\makecvtitlenamewidth
moderncv
\makecvheadnamewidth
您可以添加一个新的定义\makecvtitlenamewidth
(参见以下 MWE 中的第 91 行,重要更改以 标记<=====
)或者您必须将所有重命名\makecvtitlenamewidth
为\makecvheadnamewidth
:
\newlength{\makecvtitlenamewidth}{\setlength{\makecvtitlenamewidth}{0pt}} % <======= line 91 ======================
{suburb}
然后,您必须添加使用 od的新可选参数\address
:
\address{street and number}{suburb}{postcode city}{country} % <======== line 161 ===================
当然,您必须更改可以使用\address
新参数的命令的定义:suburb
\makeatletter % <======= line 42 ========================================
\RenewDocumentCommand{\address}{mG{}G{}G{}}{\def\@addressstreet{#1}\def\@addresssuburb{#2}\def\@addresscity{#3}\def\@addresscountry{#4}}
\makeatother
@
(这里需要命令是因为在变量名称中使用了)。
最后,你必须改变 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}%
}%
以及信件内容:
\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]
如果要改变的顺序city
,suburb
只需改变变量\@addresscity
和\@addresssuburb
。
因此,对于当前版本 2.0.0 的完整 MWEmoderncv
\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&%
\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 [email protected]}}
}
\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}
你得到了想要的结果: