blob: 10588e8b782cc3b5b727bdc5536c5b3296b9dbce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{wmletterhead}[2014/12/15 provides LaTeX WM letter head class]
% Created by Eugeniy E. Mikhailov
% v1.0 2014/12/15
% Note logo files belong to W&M
% 'wmletterhead' class accepts all options of the 'letter' class and the following
% additional options which specify the header logo
% prior2014dec - old logo prior 2014
% fullcolor - full color logo with yellowish WM cypher
% black - all black logo
% green - all green logo
% white - all white logo (quite use less on white background)
% DEFAULT options: [fullcolor]
% Recomended use:
% \documentclass[12pt,fullcolor]{wmletterhead}
%-------------- define WM header logo file ---------------------------------
\providecommand{\wmheaderlogo}{}% nologo
% this is prior December 2014 logo with Wren building
\DeclareOption{prior2014dec}{%
\renewcommand{\wmheaderlogo}%
{wmlogos/wmheader2012}%
}
% full colored logo starting from December 2014
\DeclareOption{fullcolor}{%
\renewcommand{\wmheaderlogo}%
{wmlogos/wm_horizontal_single_line_full_color}%
}
% green logo starting from December 2014
\DeclareOption{green}{%
\renewcommand{\wmheaderlogo}%
{wmlogos/wm_horizontal_single_line_green}%
}
% black logo starting from December 2014
\DeclareOption{black}{%
\renewcommand{\wmheaderlogo}%
{wmlogos/wm_horizontal_single_line_black}%
}
% black logo starting from December 2014
\DeclareOption{white}{%
\renewcommand{\wmheaderlogo}%
{wmlogos/wm_horizontal_single_line_white}%
}
%-------------- end of define WM header logo file ------------------------------
% by default all unknown options are passed to 'letter' class
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{letter}}
% DEFAULT options
\ExecuteOptions{fullcolor}
\ProcessOptions\relax
\LoadClass{letter}
\RequirePackage{graphicx}
\RequirePackage[margin=1in,letterpaper]{geometry}
\RequirePackage{fancyhdr}
%% WM fancy letter head definition
\fancypagestyle{firstpage}{% looks like this has no effect for the letter class
\fancyhf{}%
\fancyhead[R]{%
\includegraphics[height=0.5in,keepaspectratio=true]{\wmheaderlogo}%
}%
}
\fancypagestyle{plain}{% this takes care of the 2nd and the following pages
\fancyhf{}%
\fancyhead[L]{%
\includegraphics[height=0.5in,keepaspectratio=true]{\wmheaderlogo}%
}%
}
\fancypagestyle{empty}{% some how this is the very first page style
\fancyhf{}%
\fancyhead[L]{%
\includegraphics[height=0.5in,keepaspectratio=true]{\wmheaderlogo}%
}%
}
\pagestyle{plain}% important! if switched to fancy pages 2, 3, ... do not have logo
|