diff options
-rw-r--r-- | wmletterhead.cls | 92 |
1 files changed, 69 insertions, 23 deletions
diff --git a/wmletterhead.cls b/wmletterhead.cls index 4ac2d7b..0323dc4 100644 --- a/wmletterhead.cls +++ b/wmletterhead.cls @@ -15,6 +15,13 @@ % Recomended use: % \documentclass[12pt,fullcolor]{wmletterhead} +\RequirePackage{xcolor} +\RequirePackage{ifthen} + +% -------------------------------------------------- +% Tagline color since December 2014 +\definecolor{WMgold}{rgb}{0.73,0.59,0.36} + % -------------------------------------------------- % New length to be used for WM specific things @@ -34,37 +41,99 @@ % internal use sizes to lineup logo and from (W&M) address \newlength{\wmaddressheight} % to be calculated at the opening +% -------------------------------------------------- +% set page layout for one-line template +\newcommand*{\setonelinelayout}[1]{ + % first parameter intended to be used for layout switch + \def\@layout{#1}% + + % -------------------------------------------------- + % logo related settings + \setlength{\wmlogoheight}{0.65in} + \setlength{\wmlogoWhpos}{0in}% same as above + \setlength{\wmlogoWvpos}{0in}% same as above + + % default page layout parameters + \setlength{\wmlogoseparation}{0.5in} % header text from main text separation + \setlength{\wmleftmargin}{1.0in} + \setlength{\wmrightmargin}{1.0in} + \setlength{\wmbottommargin}{1.0in} % guessed + \setlength{\wmtopmargin}{1.0in} + + \colorlet{wmtaglinecolor}{black} + + % -------------------------------------------------- + % Now let's define/modify a particular layout + % esssentially this programs a 'switch' construct + \ifthenelse{\equal{\@layout}{prior2014dec}}{ + %use defaults + }{ + % nothing to do in the else case + } + \ifthenelse{\equal{\@layout}{2014}}{ + % below are measured in the Word template + \setlength{\wmlogoheight}{0.65in} + \setlength{\wmlogoWhpos}{0.82in}% same as above + \setlength{\wmlogoWvpos}{.15in}% same as above + + % -------------------------------------------------- + % Required by WM + \setlength{\wmlogoseparation}{0.5in} % header text from main text separation + \setlength{\wmleftmargin}{1.64in} + \setlength{\wmrightmargin}{1.0in} + \setlength{\wmbottommargin}{1.0in} % guessed + \setlength{\wmtopmargin}{1.0in} + + \colorlet{wmtaglinecolor}{WMgold} + }{ + % nothing to do in the else case + } +} + +\setonelinelayout{default} % set page layout defaults + %-------------- define WM header logo file --------------------------------- \providecommand{\wmheaderlogo}{}% nologo % this is prior December 2014 logo with Wren building +\DeclareOption{nologo}{% + \renewcommand{\wmheaderlogo}{}% nologo + \setonelinelayout{default}% +} + +% this is prior December 2014 logo with Wren building \DeclareOption{prior2014dec}{% \renewcommand{\wmheaderlogo}% {wmlogos/wmheader2012}% + \setonelinelayout{prior2014dec}% } % full colored logo starting from December 2014 \DeclareOption{fullcolor}{% \renewcommand{\wmheaderlogo}% {wmlogos/wm_horizontal_single_line_full_color}% + \setonelinelayout{2014}% } % green logo starting from December 2014 \DeclareOption{green}{% \renewcommand{\wmheaderlogo}% {wmlogos/wm_horizontal_single_line_green}% + \setonelinelayout{2014}% } % black logo starting from December 2014 \DeclareOption{black}{% \renewcommand{\wmheaderlogo}% {wmlogos/wm_horizontal_single_line_black}% + \setonelinelayout{2014}% } % black logo starting from December 2014 \DeclareOption{white}{% \renewcommand{\wmheaderlogo}% {wmlogos/wm_horizontal_single_line_white}% + \setonelinelayout{2014}% } %-------------- end of define WM header logo file ------------------------------ @@ -81,7 +150,6 @@ \RequirePackage{graphicx} \RequirePackage{geometry} % easy page layout manipulation \RequirePackage{fancyhdr} % Headers ! -\RequirePackage{xcolor} \colorlet{wmtaglinecolor}{black} @@ -90,28 +158,6 @@ % Change the letter class default for signature indent \setlength{\longindentation}{0pt} % this is indent of signature -\newcommand*{\setonelinelayout}[1]{ - % first parameter intended to be used for template year - % -------------------------------------------------- - - % below are measured in the Word template - \setlength{\wmlogoheight}{0.65in} - \setlength{\wmlogoWhpos}{0.82in}% same as above - \setlength{\wmlogoWvpos}{.15in}% same as above - - % -------------------------------------------------- - % Required by WM - \setlength{\wmlogoseparation}{0.5in} % header text from main text separation - \setlength{\wmleftmargin}{1.64in} - \setlength{\wmrightmargin}{1.0in} - \setlength{\wmbottommargin}{1.0in} % guessed - \setlength{\wmtopmargin}{1.0in} - - \definecolor{WMgold}{rgb}{0.73,0.59,0.36} - \colorlet{wmtaglinecolor}{WMgold} -} - -\setonelinelayout{2014} % -------------------------------------------------- % Let's calculate/set page layout |