From 3d07ddc2658c87dd2d7c0923d78df3e42af014d1 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Sat, 27 Dec 2014 15:39:53 -0500 Subject: header redone --- wmletterhead.cls | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/wmletterhead.cls b/wmletterhead.cls index 45fea3a..0d3b28d 100644 --- a/wmletterhead.cls +++ b/wmletterhead.cls @@ -114,18 +114,24 @@ } \newcommand{\wmaddress}{ - {\raggedleft\begin{tabular}{l@{}}\ignorespaces - \fromaddress \\*[2\parskip]% - \@date \end{tabular}}% + \ifx\@empty\fromaddress + {} + \else + \raggedleft% + \begin{tabular}{l@{}}\ignorespaces + \fromaddress% + \end{tabular}% + \fi } -\fancypagestyle{firstpage}{% looks like this has no effect for the letter class +\fancypagestyle{empty}{% looks like this has no effect for the letter class \wmheader{}% } \fancypagestyle{plain}{% this takes care of the 2nd and the following pages - \wmheader{}% + %\wmheader{}% + \fancyfoot[C]{\thepage}% } -\fancypagestyle{empty}{% some how this is the very first page style +\fancypagestyle{firstpage}{% some how this is the very first page style \wmheader{}% \settoheight{\headheight}{\hbox{\wmaddress}}% \newlength{\wmaddresswidth} @@ -142,13 +148,10 @@ % ------------------------------------------------------------------- % Now let redefine opening so address goes to the right of logo -\renewcommand*{\opening}[1]{\ifx\@empty\fromaddress +\renewcommand*{\opening}[1]{ \thispagestyle{firstpage}% - {\raggedleft\@date\par}% - \else % home address - \thispagestyle{empty}% - \fi + {\raggedleft\@date\par}% {\raggedright \toname \\ \toaddress \par}% - \vspace{2\parskip}% + %\vspace{2\parskip}% #1\par\nobreak} % ------------------------------------------------------------------- -- cgit v1.2.3