![求职信 moderncv 开头和结尾间距](https://linux22.com/image/354403/%E6%B1%82%E8%81%8C%E4%BF%A1%20moderncv%20%E5%BC%80%E5%A4%B4%E5%92%8C%E7%BB%93%E5%B0%BE%E9%97%B4%E8%B7%9D.png)
我正在使用 moderncv 写求职信。到目前为止一切正常,但由于我没有使用任何\opening{}
,所以我有一个很大的空白垂直间距,我不知道如何摆脱它。
\documentclass[11pt,a4paper,sans,french]{moderncv}
\usepackage{ragged2e}
% moderncv themes
\moderncvstyle{classic}
\moderncvcolor{green}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}
\name{XXX}{XXX}
\title{}
\address{XXXX}{XXX}% optional, remove / comment the line if not wanted; the "postcode city" and and "country" arguments can be omitted or provided empty
\phone[mobile]{+XXX}
\email{XXX}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\renewcommand{\baselinestretch}{1.25}
\begin{document}
% recipient data
\recipient{XXX}{XXX}
\opening{}
\closing{Sincerely,}
\makelettertitle
\justify
Dear Mr. XXX,
\makeletterclosing
\end{document}
我该如何控制这些间距?更确切地说,我该如何使它们更小?
答案1
该\opening
命令\@opening
在内部的使用moderncv
机制如下:
\@opening\\[1.5em]
一个肮脏但快速而无痛的方法就是在文档中使用命令来opening
抵消\vspace*{-1.5em}
该类后来引入的间距,即
\opening{\vspace*{-1.5em}}
这是一个完整的代码示例
\documentclass[11pt,a4paper,sans,french]{moderncv}
\usepackage{ragged2e}
% moderncv themes
\moderncvstyle{classic}
\moderncvcolor{green}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}
\name{XXX}{XXX}
\title{}
\address{XXXX}{XXX}% optional, remove / comment the line if not wanted; the "postcode city" and and "country" arguments can be omitted or provided empty
\phone[mobile]{+XXX}
\email{XXX}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\renewcommand{\baselinestretch}{1.25}
\begin{document}
% recipient data
\recipient{XXX}{XXX}
\opening{\vspace*{-1.5em}}
\closing{Sincerely,}
\makelettertitle
\justify
\vspace*{-1.5em}
Dear Mr. XXX,
\makeletterclosing
\end{document}
其结果为: