-
Notifications
You must be signed in to change notification settings - Fork 0
/
wrceletter.cls
98 lines (83 loc) · 2.64 KB
/
wrceletter.cls
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
88
89
90
91
92
93
94
% wrceletter.sty
% Revision Original, Dennis Evangelista, 2018
% Format based on Cornell University letter (cornell-letter.sty), Stanford
% suletter.sty and MIT mitletter3.cls
\ProvidesClass{wrceletter}
\typeout{** USNA Dept of Weapons, Robotics, and Control Engineering}
\typeout{** Letterhead Document Class}
\typeout{** Based on the Navy Correspondence Manual for flag letters}
% process options here, following uw-cs-letterhead
\RequirePackage{kvoptions}
\DeclareDefaultOption{%
\PassOptionsToClass{\CurrentOption}{letter}%
}
\ProcessKeyvalOptions*
\LoadClass{letter}
% load stuff
\RequirePackage{etoolbox}
\RequirePackage{mathptmx}
\RequirePackage{fancyhdr}
\RequirePackage[margin=1in,papersize={8.5in,11in}]{geometry}
\RequirePackage{graphicx}
\RequirePackage[export]{adjustbox}
\RequirePackage{hyperref}
%%% letter.cls already defines the following:
% \newcommand*{\name}[1]{\def\fromname{#1}}
% \newcommand*{\signature}[1]{\def\fromsig{#1}}
% \newcommand*{\address}[1]{\def\fromaddress{#1}}
% \newcommand*{\location}[1]{\def\fromlocation{#1}}
% \newcommand*{\telephone}[1]{\def\telephonenum{#1}}
%% Add the following to customize:
\newcommand*{\position}[1]{\def\mypos{#1}}
\newcommand*{\email}[1]{\def\emailaddr{#1}}
\position{}
\email{}
%\setlength{\headwidth}{\paperwidth}
% for first page with address
\fancypagestyle{firstpage}{%
\renewcommand{\headrulewidth}{0pt}
\fancyhf{}
\chead{}
\lhead{%
\hspace*{-0.9in}
\raisebox{0.0625in}{\includegraphics[height=1.25in,valign=c]{crest-cropped.png}}%
\begin{minipage}[c]{5.25in}
\hspace*{0.4375in}\normalsize\fromname%
\hrule
\vspace{2pt}
\hspace*{0.4375in}\scriptsize\mypos, Weapons, Robotics and Control Engineering\\
\hspace*{0.4375in}United States Naval Academy\\
\hspace*{0.4375in}\emailaddr\\
\hspace*{0.4375in}\telephonenum
\end{minipage}%
\raisebox{0.05in}{\includegraphics[height=0.875in,valign=c]{WRCE-logo.png}%
\includegraphics[height=0.875in,valign=c]{WRCE-wordmark.png}%
}}
\rhead{}
}
% for first page no address is the same
\fancypagestyle{empty}{%
\renewcommand{\headrulewidth}{0pt}
\fancyhf{}
\chead{}
\lhead{%
\hspace*{-0.9in}
\raisebox{0.0625in}{\includegraphics[height=1.25in,valign=c]{crest-cropped.png}}%
\begin{minipage}[c]{5.25in}
\hspace*{0.4375in}\normalsize\fromname%
\hrule
\vspace{2pt}
\hspace*{0.4375in}\scriptsize\mypos, Weapons, Robotics and Control Engineering\\
\hspace*{0.4375in}United States Naval Academy\\
\hspace*{0.4375in}\emailaddr\\
\hspace*{0.4375in}\telephonenum
\end{minipage}%
\raisebox{0.05in}{\includegraphics[height=0.875in,valign=c]{WRCE-logo.png}%
\includegraphics[height=0.875in,valign=c]{WRCE-wordmark.png}%
}}
\rhead{}
}
% other pages
\fancypagestyle{plain}{%
\fancyhf{}
}