![字母类别 newlfm 的所有页面中的页眉和页脚](https://linux22.com/image/292283/%E5%AD%97%E6%AF%8D%E7%B1%BB%E5%88%AB%20newlfm%20%E7%9A%84%E6%89%80%E6%9C%89%E9%A1%B5%E9%9D%A2%E4%B8%AD%E7%9A%84%E9%A1%B5%E7%9C%89%E5%92%8C%E9%A1%B5%E8%84%9A.png)
下列的另一个问题,我只想在文档的每一页上都有页脚,但我找不到办法……此外,我可以把它稍微往上放一点,而不改变底部边距吗?谢谢!
是否也可以删除电话和电子邮件后的“:”?
这里是 MWE
\documentclass[10pt,stdletter,dateno,sigleft]{newlfm}
%%%HORIZONTAL LINES
%https://tex.stackexchange.com/questions/91052/remove-header-and-footer-lines-in-newlfm
\makeatletter
\g@addto@macro{\ps@ltrhead}{%
\renewcommand{\headrulewidth}{0pt}%
\renewcommand{\footrulewidth}{0pt}%
}
\g@addto@macro{\ps@othhead}{%
\renewcommand{\headrulewidth}{0pt}%
\renewcommand{\footrulewidth}{0pt}%
}
\makeatother
%%%%%%%%%%%%%%%%%%%
\usepackage{lipsum}
\usepackage{lastpage}
\Lfooter{John Smith\hspace{1em}-\hspace{1em}{\small [email protected]}\hspace{5em}\textit{Cover Letter}}
\Rfooter{\thepage\ of \pageref{LastPage}}
\newsavebox{\Luiuc}\sbox{\Luiuc}{\parbox[b]{1.75in}{\vspace{0.5in}
\includegraphics[width=1.2\linewidth]{logo.png}}} % Company/institution logo at the top left of the page
\makeletterhead{Uiuc}{\Lheader{\usebox{\Luiuc}}}
\newlfmP{sigsize=50pt}
\newlfmP{addrfromphone}
\newlfmP{addrfromemail}
\lthUiuc
\namefrom{John Smith}
\addrfrom{
\today\\[12pt]
123 Broadway \\
City, State 12345
}
\phonefrom{(000) 111-1111}
\emailfrom{[email protected]}
\greetto{Dear Mrs. Smith,}
\closeline{Sincerely yours,}
\nameto{Mrs. Jane Smith}
\addrto{
Recruitment Officer \\
The Corporation \\
123 Pleasant Lane \\
City, State 12345
}
%----------------------------------------------------------------------------------------
\begin{document}
\begin{newlfm}
\lipsum
\lipsum
%----------------------------------------------------------------------------------------
\end{newlfm}
\end{document}
答案1
这是您的求职信的简单实现,完全没有newlfm
。因此,它可以完全定制以满足您的需求:
\documentclass{article}
% Page geometry
\usepackage{geometry}
\geometry{
margin=0.5in,% Equal margin of 0.5in from all four sides
includefoot% Include only the footer in the margin calculations, since you don't have a header
}
% Header/footer
\usepackage{fancyhdr,lastpage}
\pagestyle{fancy}% Page style will be fancy
\fancyhf{}% Clear headers and footers
\renewcommand{\headrulewidth}{0pt}% No header rule
%\renewcommand{\footrulewidth}{0pt}% No footer rule (default)
\fancyfoot[L]{John Smith \quad - \quad \href{mailto:[email protected]}{{\small [email protected]}}}
\fancyfoot[C]{\textit{Cover Letter}}
\fancyfoot[R]{\thepage\ of \pageref{LastPage}}
\usepackage{hyperref,graphicx,lipsum}
\setlength{\parindent}{0pt}% No paragraph indentation
\setlength{\parskip}{.5\baselineskip plus 0.1\baselineskip minus 0.1\baselineskip}
\begin{document}
\includegraphics[width=2in]{example-image}% Logo
\bigskip
\null\hfill% FROM details
\begin{tabular}{@{}l@{}}
\today \\[\normalbaselineskip]
123 Broadway \\
City, State 12345 \\
Telephone (000) 111-1111 \\
Email \href{mailto:[email protected]}{[email protected]}
\end{tabular}
\bigskip
% TO details
\begin{tabular}{@{}l@{}}
Mrs.\ Jane Smith \\
Recruitment Officer \\
The Corporation \\
123 Pleasant Lane \\
City, State 12345
\end{tabular}
\bigskip
Dear Mrs.\ Smith,
\bigskip
\lipsum[1-10]% You letter
\bigskip
\begin{tabular}{@{}l@{}}
Sincerely yours, \\[5\normalbaselineskip]
John Smith
\end{tabular}
\end{document}
答案2
这满足了您的部分需求。具体来说,它在所有页面上都使用了页脚。
我不确定您到底想如何在不改变底部边距的情况下将页脚向上移动。如果“底部边距”旨在包含页脚,那么显然您无法在不改变页脚的情况下将页脚向上移动。因此,我假设您的意思是“底部边距”是页面上信件正文最后一行的底部。但是,我不知道如何在不改变边距的情况下将页脚向上移动。至少,不会让事情看起来很糟糕。所以我没有在这里尝试这样做。
最后,在查看了类的代码后,我个人会学会忍受冒号。但是,如果你非常讨厌它们,你可能会有不同的感受。(文档代码未包含在我拥有的手册中,代码本身包含的注释非常少。最后,我放弃了试图找出哪个命令可能导致冒号。但是,我怀疑它埋得相当深,所以你必须在序言中复制相当多的代码。显然这是可行的,但我个人认为不值得。然而,我的怀疑可能完全是错误的。)
所以,最后我只改变了一件事:
\documentclass[10pt,stdletter,dateno,sigleft]{newlfm}
\makeatletter
\g@addto@macro{\ps@ltrhead}{%
\renewcommand{\headrulewidth}{0pt}%
\renewcommand{\footrulewidth}{0pt}%
}
\g@addto@macro{\ps@othhead}{%
\renewcommand{\headrulewidth}{0pt}%
\renewcommand{\footrulewidth}{0pt}%
}
\makeatother
\usepackage{lipsum}
\usepackage{lastpage,calc}
\newsavebox{\Ltlfoot}
\sbox{\Ltlfoot}{John Smith\hspace{1em}-\hspace{1em}{\small [email protected]}\hspace{5em}\textit{Cover Letter}}
\newlength{\myfootheight}
\settoheight{\myfootheight}{\usebox{\Ltlfoot}}
\newsavebox{\Luiuc}\sbox{\Luiuc}{\parbox[b]{1.75in}{\vspace{0.5in}
\includegraphics[width=1.2\linewidth]{example-image-a}}}
\makeletterhead{Uiuc}{%
\Lfooter{\usebox{\Ltlfoot}}%
\Lheader{\usebox{\Luiuc}}}
\Rfooter{\thepage\ of \pageref{LastPage}}
\lfooter{\usebox{\Ltlfoot}}
\rfooter{\thepage\ of \pageref{LastPage}}
\newlfmP{sigsize=50pt, minfoot=\myfootheight}
\newlfmP{addrfromphone}
\newlfmP{addrfromemail}
\lthUiuc
\namefrom{John Smith}
\addrfrom{
\today\\[12pt]
123 Broadway \\
City, State 12345
}
\phonefrom{(000) 111-1111}
\emailfrom{[email protected]}
\greetto{Dear Mrs. Smith,}
\closeline{Sincerely yours,}
\nameto{Mrs. Jane Smith}
\addrto{
Recruitment Officer \\
The Corporation \\
123 Pleasant Lane \\
City, State 12345
}
\begin{document}
\begin{newlfm}
\lipsum[1-10]
\end{newlfm}
\end{document}