在类别 letter 中移动日期 moderncv

在类别 letter 中移动日期 moderncv
%% start of file `template.tex'.
%% Copyright 2006-2013 Xavier Danaux ([email protected]).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
% available at http://www.latex-project.org/lppl/.


\documentclass[11pt,a4paper,sans]{moderncv}        % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman')

% moderncv themes
\moderncvstyle{classic}                            % style options are 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{black}                                % color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
%\renewcommand{\familydefault}{\sfdefault}         % to set the default font; use '\sfdefault' for the default sans serif font, '\rmdefault' for the default roman one, or any tex font name
%\nopagenumbers{}                                  % uncomment to suppress automatic page numbering for CVs longer than one page

% character encoding
\usepackage[utf8]{inputenc}                      
%\usepackage[ngerman]{babel}
\usepackage[ngerman, num]{isodate} % if you are not using xelatex ou lualatex, replace by the encoding you are using
%\usepackage{CJKutf8}                              % if you need to use CJK to typeset your resume in Chinese, Japanese or Korean

% adjust the page margins
\usepackage[scale=0.85]{geometry}
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
% \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
\patchcmd{\makelettertitle}{\hfill}{}{}{}% Sender address flush-left
\patchcmd{\makelettertitle}{\raggedleft}{\raggedright}{}{}

% Sender address \raggedright
%\setlength{\hintscolumnwidth}{3cm}                % if you want to change the width of the column with the dates
%\setlength{\makecvtitlenamewidth}{10cm}           % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks...

% personal data
%\renewcommand*{\addressfont}{\bfseries}
\name{{Jon}}{Doe}
%\title{Resumé title}                               % optional, remove / comment the line if not wanted
\address{Jone Doe street 12}{9999 jon}{jon}% optional, remove / comment the line if not wanted; the "postcode city" and and "country" arguments can be omitted or provided empty
\phone[mobile]{+11~(111)~1111}                   % optional, remove / comment the line if not wanted
%\phone[fixed]{+2~(345)~678~901}                    % optional, remove / comment the line if not wanted
%\phone[fax]{+3~(456)~789~012}                      % optional, remove / comment the line if not wanted
\email{[email protected]}                               % optional, remove / comment the line if not wanted
%\homepage{www.johndoe.com}                         % optional, remove / comment the line if not wanted
%\extrainfo{additional information}                 % optional, remove / comment the line if not wanted
%\photo[64pt][0.4pt]{picture}                       % optional, remove / comment the line if not wanted; '64pt' is the height the picture must be resized to, 0.4pt is the thickness of the frame around it (put it to 0pt for no frame) and 'picture' is the name of the picture file
%\quote{Some quote}                                 % optional, remove / comment the line if not wanted

% to show numerical labels in the bibliography (default is to show no labels); only useful if you make citations in your resume
%\makeatletter
%\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
%\makeatother
%\renewcommand*{\bibliographyitemlabel}{[\arabic{enumiv}]}% CONSIDER REPLACING THE ABOVE BY THIS

% bibliography with mutiple entries
%\usepackage{multibib}
%\newcites{book,misc}{{Books},{Others}}
%----------------------------------------------------------------------------------
%            content
%----------------------------------------------------------------------------------
\newlength{\currentparskip}

\begin{document}
%-----       letter       ---------------------------------------------------------
% recipient data
%\date{January 01, 1984}
\recipient{Company Recruitment team}{Company, Inc.\\123 somestreet\\some city}
 \date{Jtown, \today}

\opening{\textbf{Bewerbung: }\\[0.5cm]\textbf{Sehr geehrte Damen und Herren,}}
\closing{Yours faithfully,}
%\enclosure[Attached]{curriculum vit\ae{}}         
 % use an optional argument to use a string other than "Enclosure", or redefine \enclname
\makelettertitle
\setlength{\currentparskip}{\parskip}% save the value of paragraph spacing
\begin{minipage}{\textwidth} %create minipage
    \setlength{\parskip}{\currentparskip}% restore the value    

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis ullamcorper neque sit amet lectus facilisis sed luctus nisl iaculis. Vivamus at neque arcu, sed tempor quam. Curabitur pharetra tincidunt tincidunt. Morbi volutpat feugiat mauris, quis tempor neque vehicula volutpat. Duis tristique justo vel massa fermentum accumsan. Mauris ante elit, feugiat vestibulum tempor eget, eleifend ac ipsum. Donec scelerisque lobortis ipsum eu vestibulum. Pellentesque vel massa at felis accumsan rhoncus.

Suspendisse commodo, massa eu congue tincidunt, elit mauris pellentesque orci, cursus tempor odio nisl euismod augue. Aliquam adipiscing nibh ut odio sodales et pulvinar tortor laoreet. Mauris a accumsan ligula. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse vulputate sem vehicula ipsum varius nec tempus dui dapibus. Phasellus et est urna, ut auctor erat. Sed tincidunt odio id odio aliquam mattis. Donec sapien nulla, feugiat eget adipiscing sit amet, lacinia ut dolor. Phasellus tincidunt, leo a fringilla consectetur, felis diam aliquam urna, vitae aliquet lectus orci nec velit. Vivamus dapibus varius blandit.

Duis sit amet magna ante, at sodales diam. Aenean consectetur porta risus et sagittis. Ut interdum, enim varius pellentesque tincidunt, magna libero sodales tortor, ut fermentum nunc metus a ante. Vivamus odio leo, tincidunt eu luctus ut, sollicitudin sit amet metus. Nunc sed orci lectus. Ut sodales magna sed velit volutpat sit amet pulvinar diam venenatis.



\makeletterclosing
\end{minipage}
\end{document}


%% end of file `template.tex'.

我想移动求职信上的日期moderncv,并收件人地址和主题和右侧。

我该怎么做?我已附上 MWE。

在此处输入图片描述

答案1

请注意,您似乎正在使用 的旧版本moderncv。在当前版本moderncv2.0.0 中,您的使用makelettertitle已重命名为makeletterhead

要将日期向下移动,您必须在代码中添加以下补丁(请注意,我使用的是当前版本的补丁!):

\patchcmd{\makeletterhead}{\hfill}{\par\raggedleft}{}{} % move date down

附完整代码

%% start of file `template.tex'.
%% Copyright 2006-2013 Xavier Danaux ([email protected]).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
% available at http://www.latex-project.org/lppl/.


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

% moderncv themes
\moderncvstyle{classic}
\moderncvcolor{black}

% character encoding
\usepackage[utf8]{inputenc}
%\usepackage[ngerman]{babel}
\usepackage[ngerman, num]{isodate} 


% adjust the page margins
\usepackage[scale=0.85]{geometry}
% \usepackage{etoolbox}% http://ctan.org/pkg/etoolbox <================= already loaded by moderncv
%\patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
\patchcmd{\makeletterhead}{\hfill}{}{}{}% Sender address flush-left <======================= makelettertitle
\patchcmd{\makeletterhead}{\raggedleft}{\raggedright}{}{}
\patchcmd{\makeletterhead}{\hfill}{\par\raggedleft}{}{} % move date down

% personal data
\name{{Jon}}{Doe}
%\title{Resumé title}                               % optional, remove / comment the line if not wanted
\address{Jone Doe street 12}{9999 jon}{jon}% optional, remove / comment the line if not wanted; the "postcode city" and and "country" arguments can be omitted or provided empty
\phone[mobile]{+11~(111)~1111}                   % optional, remove / comment the line if not wanted
%\phone[fixed]{+2~(345)~678~901}                    % optional, remove / comment the line if not wanted
%\phone[fax]{+3~(456)~789~012}                      % optional, remove / comment the line if not wanted
\email{[email protected]}                               % optional, remove / comment the line if not wanted
%\homepage{www.johndoe.com}                         % optional, remove / comment the line if not wanted
%\extrainfo{additional information}                 % optional, remove / comment the line if not wanted
%\photo[64pt][0.4pt]{picture}                       % optional, remove / comment the line if not wanted; '64pt' is the height the picture must be resized to, 0.4pt is the thickness of the frame around it (put it to 0pt for no frame) and 'picture' is the name of the picture file
%\quote{Some quote}                                 % optional, remove / comment the line if not wanted

\newlength{\currentparskip}


\begin{document}
%-----       letter       ---------------------------------------------------------
% recipient data
%\date{January 01, 1984}
\date{Jtown, \today}
\recipient{Company Recruitment team}{Company, Inc.\\123 somestreet\\some city}

\opening{\textbf{Bewerbung: }\\[0.5cm]\textbf{Sehr geehrte Damen und Herren,}}
\closing{Yours faithfully,}
%\enclosure[Attached]{curriculum vit\ae{}}         
 % use an optional argument to use a string other than "Enclosure", or redefine \enclname
\makelettertitle
\setlength{\currentparskip}{\parskip}% save the value of paragraph spacing
\begin{minipage}{\textwidth} %create minipage
\setlength{\parskip}{\currentparskip}% restore the value    

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis ullamcorper 
neque sit amet lectus facilisis sed luctus nisl iaculis. Vivamus at neque 
arcu, sed tempor quam. Curabitur pharetra tincidunt tincidunt. Morbi 
volutpat feugiat mauris, quis tempor neque vehicula volutpat. Duis 
tristique justo vel massa fermentum accumsan. Mauris ante elit, feugiat 
vestibulum tempor eget, eleifend ac ipsum. Donec scelerisque lobortis 
ipsum eu vestibulum. Pellentesque vel massa at felis accumsan rhoncus.

Suspendisse commodo, massa eu congue tincidunt, elit mauris pellentesque 
orci, cursus tempor odio nisl euismod augue. Aliquam adipiscing nibh ut 
odio sodales et pulvinar tortor laoreet. Mauris a accumsan ligula. Class 
aptent taciti sociosqu ad litora torquent per conubia nostra, per 
inceptos himenaeos. Suspendisse vulputate sem vehicula ipsum varius nec 
tempus dui dapibus. Phasellus et est urna, ut auctor erat. Sed tincidunt 
odio id odio aliquam mattis. Donec sapien nulla, feugiat eget adipiscing 
sit amet, lacinia ut dolor. Phasellus tincidunt, leo a fringilla 
consectetur, felis diam aliquam urna, vitae aliquet lectus orci nec 
velit. Vivamus dapibus varius blandit.

Duis sit amet magna ante, at sodales diam. Aenean consectetur porta risus 
et sagittis. Ut interdum, enim varius pellentesque tincidunt, magna 
libero sodales tortor, ut fermentum nunc metus a ante. Vivamus odio leo, 
tincidunt eu luctus ut, sollicitudin sit amet metus. Nunc sed orci 
lectus. Ut sodales magna sed velit volutpat sit amet pulvinar diam venenatis.

\makeletterclosing
\end{minipage}
\end{document}

得到结果:

生成的字母

我建议更新到当前版本的课程moderncv

如果您坚持使用旧版本,请尝试以下补丁:

\patchcmd{\makelettertitle}{\hfill}{}{}{}% Sender address flush-left 
\patchcmd{\makelettertitle}{\raggedleft}{\raggedright}{}{}
\patchcmd{\makelettertitle}{\hfill}{\par\raggedleft}{}{} % <============ move date down

我无法测试这个,因为我只moderncv安装了当前版本...

相关内容