aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2014-12-29 10:56:42 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2014-12-29 10:59:33 -0500
commit62a93da8f4834efb1d8fb71e2a3ced4002b7451f (patch)
treeed24416b9b16c34dcc23ab6342553a21cf4f7d0b
parent4d56d19e35b227563b0eef639c01095866975741 (diff)
downloadwmletterhead-62a93da8f4834efb1d8fb71e2a3ced4002b7451f.tar.gz
wmletterhead-62a93da8f4834efb1d8fb71e2a3ced4002b7451f.zip
added tagline capability
-rw-r--r--example_wmletter.tex3
-rw-r--r--wmletterhead.cls18
2 files changed, 17 insertions, 4 deletions
diff --git a/example_wmletter.tex b/example_wmletter.tex
index 003a7bb..ec8b72b 100644
--- a/example_wmletter.tex
+++ b/example_wmletter.tex
@@ -23,6 +23,9 @@
Eugeniy E. Mikhailov%
}
+% comment out \tagline or make it empty (\tagline{}) if you do not need it
+\tagline{UNIT TAGLINE OR MESSAGE}
+
\begin{document}
\begin{letter}{
Department of Physics,\\
diff --git a/wmletterhead.cls b/wmletterhead.cls
index 82b5977..cf6f9aa 100644
--- a/wmletterhead.cls
+++ b/wmletterhead.cls
@@ -62,7 +62,9 @@
\RequirePackage{graphicx}
\RequirePackage{geometry} % easy page layout manipulation
\RequirePackage{fancyhdr} % Headers !
+\RequirePackage{xcolor}
+\definecolor{WMgold}{rgb}{0.73,0.59,0.36}
% --------------------------------------------------
% Change the letter class default for signature indent
@@ -102,7 +104,10 @@
\newlength{\wmtopmargin} %start position for address or logo
\setlength{\wmtopmargin}{1.0in}
+\colorlet{wmtaglinecolor}{WMgold}
+% --------------------------------------------------
+% internal use sizes to lineup logo and from (W&M) address
\newlength{\wmaddressheight} % to be calculated at the opening
\newlength{\wmaddresstotalheight}
\newlength{\wmaddresswidth}
@@ -154,6 +159,10 @@
\hfill\wmaddress{}%
}
+% -------------------------------------------------------------------
+% This takes care of WM tagline which we will put in the central footer
+\newcommand*{\tagline}[1]{\def\lettertagline{#1}}
+\tagline{}
% -------------------------------------------------------------------
% fancyheader definitions
@@ -166,14 +175,15 @@
\fancypagestyle{plain}{% this takes care of the 2nd and the following pages
\renewcommand{\headrulewidth}{0pt}
\fancyfoot[C]{\thepage}%
- \renewcommand{\headrulewidth}{0pt}
}
-
\fancypagestyle{firstpage}{% some how this is the very first page style
\renewcommand{\headrulewidth}{0pt}
- \fancyfoot[C]{\thepage}%
- \renewcommand{\headrulewidth}{0pt}
+ \ifx\lettertagline\@empty
+ \fancyfoot[C]{\thepage}%
+ \else
+ \fancyfoot[C]{{\color{wmtaglinecolor}\lettertagline}\\\thepage}%
+ \fi
}
\pagestyle{plain}% important! if switched to fancy pages 2, 3, ... do not have logo