diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2014-12-17 01:51:20 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2014-12-17 02:02:54 -0500 |
commit | cfc3b5fc0ec67ba43c4ef6897195ae9624516a31 (patch) | |
tree | 43c56b0369e5ad46415e54bf99e0f82122da3f84 | |
parent | 0c380c94cf1959a98a4c04b8f0d4f7c4da0ed577 (diff) | |
download | wmletterhead-cfc3b5fc0ec67ba43c4ef6897195ae9624516a31.tar.gz wmletterhead-cfc3b5fc0ec67ba43c4ef6897195ae9624516a31.zip |
using textpos package to place WM logo, positions and sizes have names now
-rw-r--r-- | wmletterhead.cls | 44 |
1 files changed, 40 insertions, 4 deletions
diff --git a/wmletterhead.cls b/wmletterhead.cls index eb91038..ef23549 100644 --- a/wmletterhead.cls +++ b/wmletterhead.cls @@ -59,17 +59,53 @@ \LoadClass{letter} +\newlength{\wmlogoheight} +\newlength{\wmlogowidth} +\newlength{\wmlogohpos} +\newlength{\wmlogovpos} + +% below are measured in the Word template +\setlength{\wmlogoheight}{0.65in} +\setlength{\wmlogowidth}{3.64in} +\setlength{\wmlogohpos}{0.76in}% +\setlength{\wmlogovpos}{0.75in}% + +% -------------------------------------------------- +% Required by WM +\newlength{\wmlogoseparation} +\setlength{\wmlogoseparation}{0.5in} + +\newlength{\wmleftmargin} +\setlength{\wmleftmargin}{1.64in} + +\newlength{\wmrightmargin} +\setlength{\wmrightmargin}{1.0in} + +\newlength{\wmbottommargin} +\setlength{\wmbottommargin}{1.0in} % guessed +% -------------------------------------------------- + +% -------------------------------------------------- +% Let's calculate top margin +\newlength{\wmtopmargin} +\setlength{\wmtopmargin}{\wmlogoheight}% +\addtolength{\wmtopmargin}{\wmlogovpos}% +\addtolength{\wmtopmargin}{\wmlogoseparation}% +% -------------------------------------------------- + \RequirePackage{graphicx} -\RequirePackage[margin=1in,letterpaper]{geometry} +\RequirePackage[top=\wmtopmargin, left=\wmleftmargin, right=\wmrightmargin, bottom=\wmbottommargin, letterpaper]{geometry} +\RequirePackage[absolute]{textpos} \RequirePackage{fancyhdr} %% WM fancy letter head definition -\renewcommand{\wmlogoheight}{0.65in}% -\renewcommand{\wmheader}{ +\newcommand{\wmheader}{ \fancyhf{}% \fancyhead[L]{% - \includegraphics[height=\wmlogoheight,keepaspectratio=true]{\wmheaderlogo}% + \begin{textblock*}{\wmlogowidth}(\wmlogohpos{},\wmlogovpos{})% + \includegraphics[height=\wmlogoheight{},keepaspectratio=true]{\wmheaderlogo}% + \end{textblock*}% }% \renewcommand{\headrulewidth}{0pt}% \fancyfoot[C]{\thepage}% |