Commits

Panagiotis Mavrogiorgos  committed f8663fc

Add command \showpagenumbers for displaying "Page N of M" at the footer.

  • Participants
  • Parent commits 8258627

Comments (0)

Files changed (3)

File cover-letter-example.pdf

Binary file modified.

File cover-letter-example.tex

 
 \begin{document}
 
+% By default the footer is empty. If you uncomment the following line, the
+% footer will display the message "Page N of M".
+%\showpagenumbers
+
 \typesetSender
 \typesetRecipient
 \typesetDate

File cover-letter.sty

 \RequirePackage{paralist}
 \RequirePackage{hyperref}
 \RequirePackage{url}
+\RequirePackage{fancyhdr}
+\RequirePackage{totcount}
+
+% Page numbering
+\regtotcounter{page}
+\pagestyle{empty}
+
+\newcommand{\showpagenumbers}{%
+    \newcounter{totalpages}
+    \setcounter{totalpages}{\totvalue{page}}
+    \pagestyle{fancy}
+    \fancyhead[RCL]{}
+    \fancyfoot[RL]{}
+    \fancyfoot[C]{\emph{Page \textbf{\thepage}\ of \textbf{\thetotalpages}}}
+    \renewcommand{\headrulewidth}{0pt}
+    \renewcommand{\footrulewidth}{0pt}
+}
+
 
 % Key definition
 \pgfqkeys{/recipient}{