diff options
Diffstat (limited to 'wmletterhead.cls')
-rw-r--r-- | wmletterhead.cls | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/wmletterhead.cls b/wmletterhead.cls index ebb66e7..45fea3a 100644 --- a/wmletterhead.cls +++ b/wmletterhead.cls @@ -58,7 +58,11 @@ \ProcessOptions\relax \LoadClass{letter} +\RequirePackage{calc} + +% -------------------------------------------------- +% WM logos parameters \newlength{\wmlogoheight} \newlength{\wmlogowidth} \newlength{\wmlogohpos} @@ -66,14 +70,14 @@ % below are measured in the Word template \setlength{\wmlogoheight}{0.65in} -\setlength{\wmlogowidth}{3.64in} -\setlength{\wmlogohpos}{0.76in}% -\setlength{\wmlogovpos}{0.75in}% +\setlength{\wmlogowidth}{3.64in}% ideally should be scaled from \wmlogoheight +\setlength{\wmlogohpos}{0.76in}% ideally should be calculated from \wmleftmargin and \wmlogoheight +\setlength{\wmlogovpos}{0.75in}% same as above % -------------------------------------------------- % Required by WM \newlength{\wmlogoseparation} -\setlength{\wmlogoseparation}{0.5in} +\setlength{\wmlogoseparation}{0.5in} % header text from main text separation \newlength{\wmleftmargin} \setlength{\wmleftmargin}{1.64in} @@ -88,13 +92,11 @@ % -------------------------------------------------- % Let's calculate top margin \newlength{\wmtopmargin} -\setlength{\wmtopmargin}{\wmlogoheight}% -\addtolength{\wmtopmargin}{\wmlogovpos}% -\addtolength{\wmtopmargin}{\wmlogoseparation}% +\setlength{\wmtopmargin}{\wmlogoheight+\wmlogovpos+\wmlogoseparation}% % -------------------------------------------------- \RequirePackage{graphicx} -\RequirePackage[top=\wmtopmargin, left=\wmleftmargin, right=\wmrightmargin, bottom=\wmbottommargin, letterpaper]{geometry} +\RequirePackage[top=\wmtopmargin, left=\wmleftmargin, right=\wmrightmargin, bottom=\wmbottommargin, letterpaper, showframe]{geometry} \RequirePackage[absolute]{textpos} \RequirePackage{fancyhdr} @@ -129,9 +131,7 @@ \newlength{\wmaddresswidth} \settowidth{\wmaddresswidth}{\hbox{\wmaddress}}% \newlength{\wmaddresshpos} - \setlength{\wmaddresshpos}{\paperwidth} - \addtolength{\wmaddresshpos}{-\wmrightmargin} - \addtolength{\wmaddresshpos}{-\wmaddresswidth} + \setlength{\wmaddresshpos}{\paperwidth-\wmrightmargin-\wmaddresswidth} \fancyhead[R]{% \begin{textblock*}{\wmaddresswidth}(\wmaddresshpos{},\wmlogovpos{})% \wmaddress{}% |