ModernCV 求职信 - 换边

ModernCV 求职信 - 换边

我想在 ModernCV Latex 模板中稍微编辑一下求职信。我想将我的个人数据放在页面左侧,将收件人和我的签名(在信件下方)放在右侧。我该怎么做?

谢谢!

答案1

\documentclass{moderncv}

\moderncvstyle{classic}
\moderncvcolor{orange}

\makeatletter
\renewcommand*{\recomputeletterlengths}{%
  \recomputecvlengths%
  \setlength{\parskip}{6\p@}}

\renewcommand*{\makelettertitle}{%
  % recompute lengths (in case we are switching from letter to resume, or vice versa)
  \recomputeletterlengths%
  % sender contact info
  \begin{minipage}[t]{.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}
    % date
  \hfill% US style
  %\\[1em]% UK style
  \@date%\\[1em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900"
  % recipient block
  \par\mbox{}\hfill%
  \begin{minipage}[t]{.5\textwidth}
    \raggedleft%
    \addressfont%
    {\bfseries\upshape\@recipientname}\\%
    \@recipientaddress%
    \par
  \end{minipage}
  \\[2em]
  % opening
  \raggedright%
  \@opening\\[1.5em]%
  \hspace{0pt}\par\vspace{-\baselineskip}\vspace{-\parskip}}

\renewcommand*{\makeletterclosing}{%
  \raggedleft
  \@closing\\[3em]%
  \raggedright
  {\bfseries \@firstname~\@lastname}%
  \ifthenelse{\isundefined{\@enclosure}}{}{%
    \\%
    \vfill%
    {\color{color2}\itshape\enclname: \@enclosure}}}
    \makeatother

\usepackage{lipsum}
\title{Curriculum Vitae}
\address{Some street}{City}
\mobile{123456}
\phone{3654789}
\fax{85698745}

\begin{document}

\recipient{HR Departmnet}{Corporation\\123 Pleasant Lane\\12345 City, State} % Letter recipient
\date{\today} % Letter date
\opening{Dear Sir or Madam,} % Opening greeting
\closing{Sincerely yours,} % Closing phrase
\enclosure[Attached]{curriculum vit\ae{}} % List of enclosed documents

\makelettertitle % Print letter title
\lipsum[1-2] % Dummy text

\makeletterclosing % Print letter signature

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

\end{document}

在此处输入图片描述

相关内容