From cfc3b5fc0ec67ba43c4ef6897195ae9624516a31 Mon Sep 17 00:00:00 2001
From: Eugeniy Mikhailov <evgmik@gmail.com>
Date: Wed, 17 Dec 2014 01:51:20 -0500
Subject: using textpos package to place WM logo, positions and sizes have
 names now

---
 wmletterhead.cls | 44 ++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 40 insertions(+), 4 deletions(-)

(limited to 'wmletterhead.cls')

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}%
-- 
cgit v1.2.3

