我尝试遵循我能找到的所有建议,尤其是如何在我的文档中添加“第 # 页,共 ## 页”?,但不知何故无法将页码插入到我的求职信中。newlfm
请问文档的方法是否不同?
\documentclass[10pt,stdletter,dateno,sigleft]{newlfm} % Extra options: 'sigleft' for a left-aligned signature, 'stdletternofrom' to remove the from address, 'letterpaper' for US letter paper - consult the newlfm class manual for more options
\usepackage{charter} % Use the Charter font for the document text
\sloppy
\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} % Slightly decrease the height of the signature field
\newlfmP{addrfromphone} % Print a phone number under the sender's address
\newlfmP{addrfromemail} % Print an email address under the sender's address
\PhrPhone{Phone} % Customize the "Telephone" text
\PhrEmail{Email} % Customize the "E-mail" text
\lthUiuc % Print the company/institution logo
%----------------------------------------------------------------------------------------
% YOUR NAME AND CONTACT INFORMATION
%----------------------------------------------------------------------------------------
\namefrom{John Smith} % Name
\addrfrom{
\today\\[12pt] % Date
123 Broadway \\ % Address
City, State 12345
}
\phonefrom{(000) 111-1111} % Phone number
\emailfrom{[email protected]} % Email address
%----------------------------------------------------------------------------------------
% ADDRESSEE AND GREETING/CLOSING
%----------------------------------------------------------------------------------------
\greetto{Dear Mrs. Smith,} % Greeting text
\closeline{Sincerely yours,} % Closing text
\nameto{Mrs. Jane Smith} % Addressee of the letter above the to address
\addrto{
Recruitment Officer \\ % To address
The Corporation \\
123 Pleasant Lane \\
City, State 12345
}
%----------------------------------------------------------------------------------------
\begin{document}
\begin{newlfm}
%----------------------------------------------------------------------------------------
% LETTER CONTENT
%----------------------------------------------------------------------------------------
PARAGRAPH ONE: State the reason for the letter, name the position or type of work you are applying for and identify the source from which you learned of the opening (i.e. career development center, newspaper, employment service, personal contact).
PARAGRAPH TWO: Indicate why you are interested in the position, the company, its products, services - above all, stress what you can do for the employer. If you are a recent graduate, explain how your academic background makes you a qualified candidate for the position. If you have practical work experience, point out specific achievements or unique qualifications.
PARAGRAPH THREE: Request a personal interview and indicate your flexibility as to the time and place. Repeat your phone number in the letter and offer assistance to help in a speedy response. For example, state that you will be in the city where the company is located on a certain date and would like to set up an interview. Alternatively, state that you will call on a certain date to set up an interview. End the letter by thanking the employer for taking time to consider your credentials.
%----------------------------------------------------------------------------------------
\end{newlfm}
\end{document}
答案1
newlfm
empty
在解析环境时设置页面样式。您可以通过在环境\thispagestle{plain}
内执行(或其他样式)来覆盖此设置newlfm
,也许还可以使用\pagestyle{plain}
- 为第一页和后续页面设置不同的页面样式和布局。
不过,我建议采用一种更灵活的替代方法:使用标准article
文档类重写您的求职信并自行管理布局:
\documentclass{article}
\usepackage{graphicx,charter,geometry,fancyhdr,lastpage}
\usepackage{lipsum}
\geometry{margin=1in}% Set the page geometry
\pagestyle{fancy}
\fancyhf{}% Clear header/footer
\renewcommand{\headrulewidth}{0pt}% No header rule
\renewcommand{\footrulewidth}{0pt}% No footer rule
\fancyfoot[C]{\thepage~of~\pageref{LastPage}}% Centred footer
\setlength{\parindent}{0pt}% No paragraph indent
\setlength{\parskip}{.5\baselineskip}
\begin{document}
\includegraphics[width=.2\linewidth]{example-image}% Your logo here
\rule{\linewidth}{1pt}
\vspace{3\baselineskip}
\null\hfill
\begin{tabular}{l@{}}
\today \\ \\
123 Broadway \\
City, State 12345 \\
Phone: (000) 111-1111 \\
Email: [email protected]
\end{tabular}
\bigskip
\begin{tabular}{@{}l}
Mrs.\ Jane Smith \\
Recruitment Officer \\
The Corporation \\
123 Pleasant Lane \\
City, State 12345
\end{tabular}
\bigskip
Dear Mrs.\ Smith,
\medskip
\lipsum[1-15]% Your cover letter text here
\bigskip
\begin{tabular}{@{}l}
Sincerely yours, \\[50pt]
John Smith
\end{tabular}
\end{document}
答案2
这种lastpage
方法也有效newlfm
,在信函主体开始后的某处看到这一行(我只是把它放在那里)
\textbf{\textcolor{blue}{This is page \thepage~ of \pageref{LastPage} pages}}
在输出中它将以蓝色打印。当前页面用 表示\thepage
,总页数用 表示\pageref{LastPage}
。随意更改格式和位置...
\documentclass[10pt,stdletter,dateno,sigleft]{newlfm} % Extra options: 'sigleft' for a left-aligned signature, 'stdletternofrom' to remove the from address, 'letterpaper' for US letter paper - consult the newlfm class manual for more options
\usepackage{xcolor}%
\usepackage{lastpage}%
\usepackage{charter} % Use the Charter font for the document text
\sloppy
\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} % Slightly decrease the height of the signature field
\newlfmP{addrfromphone} % Print a phone number under the sender's address
\newlfmP{addrfromemail} % Print an email address under the sender's address
\PhrPhone{Phone} % Customize the "Telephone" text
\PhrEmail{Email} % Customize the "E-mail" text
\lthUiuc % Print the company/institution logo
%----------------------------------------------------------------------------------------
% YOUR NAME AND CONTACT INFORMATION
%----------------------------------------------------------------------------------------
\namefrom{John Smith} % Name
\addrfrom{
\today\\[12pt] % Date
123 Broadway \\ % Address
City, State 12345
}
\phonefrom{(000) 111-1111} % Phone number
\emailfrom{[email protected]} % Email address
%----------------------------------------------------------------------------------------
% ADDRESSEE AND GREETING/CLOSING
%----------------------------------------------------------------------------------------
\greetto{Dear Mrs. Smith,} % Greeting text
\closeline{Sincerely yours,} % Closing text
\nameto{Mrs. Jane Smith} % Addressee of the letter above the to address
\addrto{
Recruitment Officer \\ % To address
The Corporation \\
123 Pleasant Lane \\
City, State 12345
}
%----------------------------------------------------------------------------------------
\begin{document}
\begin{newlfm}
%----------------------------------------------------------------------------------------
% LETTER CONTENT
%----------------------------------------------------------------------------------------
\textbf{\textcolor{blue}{This is page \thepage~ of \pageref{LastPage} pages}}
PARAGRAPH ONE: State the reason for the letter, name the position or type of work you are applying for and identify the source from which you learned of the opening (i.e. career development center, newspaper, employment service, personal contact).
PARAGRAPH TWO: Indicate why you are interested in the position, the company, its products, services - above all, stress what you can do for the employer. If you are a recent graduate, explain how your academic background makes you a qualified candidate for the position. If you have practical work experience, point out specific achievements or unique qualifications.
PARAGRAPH THREE: Request a personal interview and indicate your flexibility as to the time and place. Repeat your phone number in the letter and offer assistance to help in a speedy response. For example, state that you will be in the city where the company is located on a certain date and would like to set up an interview. Alternatively, state that you will call on a certain date to set up an interview. End the letter by thanking the employer for taking time to consider your credentials.
%----------------------------------------------------------------------------------------
%%% Dummy paragraphs!
PARAGRAPH FOUR: Request a personal interview and indicate your flexibility as to the time and place. Repeat your phone number in the letter and offer assistance to help in a speedy response. For example, state that you will be in the city where the company is located on a certain date and would like to set up an interview. Alternatively, state that you will call on a certain date to set up an interview. End the letter by thanking the employer for taking time to consider your credentials.
PARAGRAPH FIVE: Request a personal interview and indicate your flexibility as to the time and place. Repeat your phone number in the letter and offer assistance to help in a speedy response. For example, state that you will be in the city where the company is located on a certain date and would like to set up an interview. Alternatively, state that you will call on a certain date to set up an interview. End the letter by thanking the employer for taking time to consider your credentials.
\end{newlfm}
\end{document}