当我将比例增加到 时left=4cm, right=3cm
,页脚中的第二封电子邮件将移至下一行。因此,使用与以下信函模板中相同的比例,我如何才能让页脚中的两封电子邮件保持在同一行,也就是说,如何防止第二封电子邮件阻止进入下一行。
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.95, top=1cm, bottom=2cm, left=4cm, right=3cm]{geometry}
\renewcommand*{\addressfont}{\small\mdseries}
\name{John}{Templeton}
\title{Resumé title}
\address{36 Mauniour, Valybir, Alcansa}{}{United States}
\phone[mobile]{+19193433283}
\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
\setlength{\currentparskip}{\parskip}
\setlength{\parskip}{\currentparskip}
The body of the letter
\vspace{0.5cm}
\enclosure [\upshape Attached]{\upshape resume, writing sample.}
\makeletterclosing
\clearpage
\end{document}
答案1
嗯,一种可能性是将页脚()的定义宽度改得0.8\textwidth
稍微长一点。
你moderncvfooti.sty
会发现定义
% lengths
\@initializelength{\footwidth}%
\renewcommand*{\recomputefootlengths}{%
\setlength{\footwidth}{0.8\textwidth}}
将以下代码添加到你的前言中并改变其宽度:
\renewcommand*{\recomputefootlengths}{%
\setlength{\footwidth}{0.85\textwidth}} % original: 0.8\textwidth
使用以下 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=4cm, right=3cm,showframe]{geometry} % left=4cm, right=3cm left=2cm, right=1cm
\usepackage{blindtext} % to generate dummy text <===========================
%\setlength{\hintscolumnwidth}{3cm}
%\setlength{\makecvtitlenamewidth}{10cm}
% lengths
%\@initializelength{\footwidth}%
\renewcommand*{\recomputefootlengths}{% <======================================
\setlength{\footwidth}{0.85\textwidth}} % original: 0.8\textwidth <==========
\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
\setlength{\parskip}{\currentparskip}% restore the value
The body of the letter
\blindtext
\vspace{0.5cm}
\enclosure [\upshape Attached]{\upshape resume, writing sample.}
\makeletterclosing
\clearpage
\end{document}
得到结果:
在 1.3.0 版本中,文件 中定义了cv (命令)和字母( )moderncv
的页脚。\makecvfooter
\makeletterfooter
moderncvstylecasual.sty
要更改命令,\makeletterfooter
您可以使用以下代码:
\patchcmd{\makeletterfooter}{\setlength{\footerwidth}{0.8\textwidth}}{\setlength{\footerwidth}{0.85\textwidth}}{}{} % <==========
((如果您需要它来更改命令\makecvfooter
:
\patchcmd{\makecvfooter}{\setlength{\footerwidth}{0.8\textwidth}}{\setlength{\footerwidth}{0.85\textwidth}}{}{} % <==========
以下 MWE 仅适用于 1.3.0 版本
\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=4cm, right=3cm,showframe]{geometry} % left=4cm, right=3cm left=2cm, right=1cm
\usepackage{blindtext} % to generate dummy text <===========================
%\setlength{\hintscolumnwidth}{3cm}
%\setlength{\makecvtitlenamewidth}{10cm}
\patchcmd{\makeletterfooter}{\setlength{\footerwidth}{0.8\textwidth}}{\setlength{\footerwidth}{0.85\textwidth}}{}{} % <==========
\renewcommand*{\addressfont}{\small\mdseries}
% personal data
\firstname{John} % Your first name
\familyname{Templeton} % Your last name
\title{Resumé title}
\address{36 Mauniour, Valybir, Alcansa}{}{United States}
\mobile{+19193433283}
\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
\setlength{\parskip}{\currentparskip}% restore the value
The body of the letter
\blindtext
\vspace{0.5cm}
\enclosure [\upshape Attached]{\upshape resume, writing sample.}
\makeletterclosing
\clearpage
\end{document}