我有这个moderncv
正式信件模板,但我无法将文本分布在多页中。信件正文总是限制在一页内。因此,如果信件正文太大,它会在顶部的收件人地址后分页,然后转到第二页,无论文本如何变大,它都会停留在那里。我怎样才能将信件均匀地分布在多页中。
\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{casual}
% style options are 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{blue} % 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.95, top=1cm, bottom=2cm, left=2cm, right=1cm]{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...
\renewcommand*{\addressfont}{\small\mdseries}
% personal data
\name{John}{Templeton}
\title{Resumé title} % optional, remove / comment the line if not wanted
\address{36 Mauniour, Valybir, Alcansa}{}{United States}% optional, remove / comment the line if not wanted; the "postcode city" and and "country" arguments can be omitted or provided empty
\phone[mobile]{+19193433283} % optional, remove / comment the line if not wanted
\email{[email protected]}
\extrainfo{\emailsymbol\emaillink{r\[email protected]}}
\newlength{\currentparskip}
\begin{document}
%----- letter ---------------------------------------------------------
% recipient data
\recipient{Department of Philology \\
Faculty of Humanities \\
University California\\
Elgsdelaan 1105 \\
1081 HV California\\
[email protected]\\
Job number:5675}{}
\date{\today}
\opening{To whom it may concern,}
\closing{Yours sincerely,\vspace{-0.5cm}}
\makelettertitle
\setlength{\currentparskip}{\parskip}% save the value of paragraph spacing
\begin{minipage}{\textwidth} %create minipage
\setlength{\parskip}{\currentparskip}% restore the value
The body of the letter
\vspace{0.5cm}
\enclosure [\upshape Attached]{\upshape resume, writing sample.} % use an optional argument to use a string other than "Enclosure", or redefine \enclname\
\makeletterclosing
\clearpage
\end{minipage}
\end{document}
答案1
嗯,看来你想让这封信得到证实。
因此您使用了minipage
有缺点的环境,即minipage
放在一页上。
更好的方法是使用包ragged2e
,它有一个命令\justifing
可以返回对齐的文本文档,因为类的字母moderncv
只能左对齐。
使用以下 MWE(参见标有 的重要代码部分<========
)
\documentclass[11pt,a4paper,sans]{moderncv}
% moderncv themes
\moderncvstyle{casual}
\moderncvcolor{blue}
% character encoding
\usepackage[utf8]{inputenc}
% adjust the page margins
\usepackage[scale=0.95, top=1cm, bottom=2cm, left=2cm, right=1cm, showframe]{geometry}
\usepackage{blindtext}
\usepackage{ragged2e} % to use command \justifing <=====================
%\setlength{\hintscolumnwidth}{3cm}
%\setlength{\makecvtitlenamewidth}{10cm}
\renewcommand*{\addressfont}{\small\mdseries}
% personal data
\name{John}{Templeton}
\title{Resumé title} % optional, remove / comment the line if not wanted
\address{36 Mauniour, Valybir, Alcansa}{}{United States}% optional, remove / comment the line if not wanted; the "postcode city" and and "country" arguments can be omitted or provided empty
\phone[mobile]{+19193433283} % optional, remove / comment the line if not wanted
\email{[email protected]}
\extrainfo{\emailsymbol\emaillink{r\[email protected]}}
\newlength{\currentparskip}
\begin{document}
\recipient{Department of Philology \\
Faculty of Humanities \\
University California\\
Elgsdelaan 1105 \\
1081 HV California\\
[email protected]\\
Job number:5675}{}
\date{\today}
\opening{To whom it may concern,}
\closing{Yours sincerely,\vspace{-0.5cm}}
\makelettertitle
%\begin{minipage}{\textwidth} %create minipage <========================
\justifying % from package ragged2e <===================================
The body of the letter
\blindtext
\vspace{10cm}
\blindtext
\blindtext
\enclosure [\upshape Attached]{\upshape resume, writing sample.}
\makeletterclosing
\clearpage
%\end{minipage} % <=====================================================
\end{document}
这封信是有道理的,而且正如我们所希望的那样超过了两页……