在个人信息和信件开头之间添加垂直空间

在个人信息和信件开头之间添加垂直空间

我想在我的个人物品和我要写信的人的句子之间添加一些空格。我尝试添加一些\vspace

\begin{document}
%HERE
%-----       letter       ---------------------------------------------------------
% recipient data
\recipient{Monsieur le général sous-directeur\\du recrutement de l'Armée de l'Air}{}
%HERE
\date{24 décembre 2017}
%HERE
\opening{}
%AND HERE

但仍然没有成功

在此处输入图片描述

这是一个可重现的例子:

%% 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/.
%Version for spanish users, by dgarhdez

\makeatletter
\AtBeginDocument{\def\@closing\\[#1]{}}
\makeatother

\documentclass[11pt,a4paper,roman]{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')
\usepackage[spanish,es-lcroman]{babel}
\usepackage{ragged2e}
\setlength\parindent{24pt}

% moderncv themes
\moderncvstyle{classic}                            % style options are 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{green}                              % 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}                       % 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.78]{geometry}
%\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
\name{John}{Doe}
\title{Lettre de motivation }                               % optional, remove / comment the line if not wanted
\address{123 rue de Convention}{75000 Paris}% optional, remove / comment the line if not wanted; the "postcode city" and and "country" arguments can be omitted or provided empty
\phone[mobile]{06-20-05-03-00}                   % 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
%----------------------------------------------------------------------------------
\begin{document}
%-----       letter       ---------------------------------------------------------
% recipient data
\recipient{Monsieur le général sous-directeur\\du recrutement de l'Armée de l'Air}{}
\date{24 décembre 2017}
\opening{}

%\enclosure[Pièce-jointe]{CV}          % use an optional argument to use a string other than "Enclosure", or redefine \enclname
\makelettertitle

% permet de justifier
\justifying
\hspace{4ex}Agé de 24 ans, actuellement en Master 2 Recherche en Intelligence Artificielle à l’Université Paris-Dauphine, je suis candidat au concours de l'Ecole de l'Air en tant qu'officier sur titre.

\end{document}

答案1

xpatch可以这样做:

\makeatletter
\AtBeginDocument{\def\@closing\\[#1]{}}
\makeatother

\documentclass[11pt,a4paper,roman]{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')
\usepackage[spanish,es-lcroman]{babel}
\usepackage{ragged2e}
\setlength\parindent{24pt}



% moderncv themes
\moderncvstyle{classic}                            % style options are 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{green}                              % color options 'blue' (default), 'orange', 'green', 'red', 'purple', % character encoding
\usepackage[utf8]{inputenc}                       % if you are not using xelatex ou lualatex, replace by the encoding 
% adjust the page margins
\usepackage[scale=0.78]{geometry}

% personal data
\name{John}{Doe}
\title{Lettre de motivation }                               % optional, remove / comment the line if not wanted
\address{123 rue de Convention}{75000 Paris}% optional, remove / comment the line if not wanted; the "postcode city" and and "country" arguments can be omitted or provided empty
\phone[mobile]{06-20-05-03-00}                   % optional, remove / comment the line if not wanted
\email{[email protected]}                               % optional, remove / comment the line if not wanted



\usepackage{xpatch}


\makeatletter
\xpatchcmd\makeletterhead
{\@date}{\vskip-2\baselineskip\hfill\@date}
{}{\PatchFailed}
\makeatother

\makeatletter
\xpatchcmd\makeletterhead
{\@recipientname}{\vskip 2\baselineskip\@recipientname}
{}{\PatchFailed}
\makeatother
%----------------------------------------------------------------------------------
%            content
%----------------------------------------------------------------------------------
\begin{document}
%-----       letter       ---------------------------------------------------------
% recipient data
\recipient{Monsieur le général sous-directeur\\du recrutement de l'Armée de l'Air}{}
\date{24 décembre 2017}
\opening{}

%\enclosure[Pièce-jointe]{CV}          % use an optional argument to use a string other than "Enclosure", or redefine \enclname
\makelettertitle

% permet de justifier
\justifying
\hspace{4ex}Agé de 24 ans, actuellement en Master 2 Recherche en Intelligence Artificielle à l’Université Paris-Dauphine, je suis candidat au concours de l'Ecole de l'Air en tant qu'officier sur titre.

\end{document}

在此处输入图片描述

相关内容