initial version of coverletter sent to UW
[bmh-jobmarket_coverletter] / mitletter3.cls
1 \NeedsTeXFormat{LaTeX2e}
2 \ProvidesClass{mitletter3}
3 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{letter}}
4 \ProcessOptions
5 \LoadClass{letter}
6 \usepackage{graphicx}
7 \usepackage[businessenvelope]{envlab}
8
9 \usepackage{color}
10 \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
11 \definecolor{mitred}{RGB}{128,0,0}
12
13 \raggedright
14
15 \setlength{\topmargin}{-.80in}
16 \setlength{\oddsidemargin}{-.25in}
17 \setlength{\evensidemargin}{-.25in}
18 \setlength{\textwidth}{7in}
19 \setlength{\textheight}{8.3in}
20 \setlength{\headsep}{1in}
21 \setlength{\footskip}{0.45in}
22
23 \DeclareFixedFont{\boldfont}{OT1}{cmss}{bx}{n}{8}
24 \DeclareFixedFont{\regularfont}{OT1}{cmss}{m}{n}{8}
25  \DeclareFixedFont{\italicfont}{OT1}{cmr}{m}{it}{10}
26
27 \renewcommand*{\opening}[1]{\ifx\@empty\fromaddress
28   \thispagestyle{firstpage}%
29     {\raggedleft\@date\par}%
30   \else  % home address
31     \thispagestyle{empty}%
32     {\raggedleft\begin{tabular}{l@{}}\ignorespaces
33       \fromaddress \\*[2\parskip]%
34       \@date \end{tabular}\par}%
35   \fi
36   \vspace{2\parskip}%
37   {\raggedright \toname \\ \toaddress \par}%
38   \vspace{2\parskip}%
39   #1\par\nobreak}
40 \renewcommand{\ps@headings}{% 
41   \renewcommand{\@evenfoot}{\usebox{\footer}}
42   \renewcommand{\@oddfoot}{\usebox{\footer}}
43       \def\@oddhead{\slshape\headtoname{} \ignorespaces\toname
44                     \hfil \pagename{} \thepage}%
45       \let\@evenhead\@oddhead}
46 \renewcommand*{\opening}[1]{\ifx\@empty\fromaddress
47   \thispagestyle{firstpage}%
48     \@date\\%
49   \else  % home address
50     \thispagestyle{empty}%
51     {\raggedleft\begin{tabular}{l@{}}\ignorespaces
52       \fromaddress \\*[2\parskip]%
53       \@date \end{tabular}\par}%
54   \fi
55   \vspace{2\parskip}%
56   {\raggedright \toname \\ \toaddress \par}%
57   \vspace{2\parskip}%
58   #1\par\nobreak}
59 \renewcommand*{\signature}[1]{\def\fromsig{#1}}
60 \newcommand{\officename}{MIT Sloan School of Management\\MIT Media Lab}
61 \newcommand{\associateofficename}{}
62 \newcommand{\roomnumber}{E62-341}
63 \newcommand{\phonenum}{206.409.7191}
64 \newcommand{\faxnum}{815.361.7509}
65 \newcommand{\website}{http://mako.cc/academic/}
66 \newcommand{\email}{mako@mit.edu}
67 \newcommand{\person}{Benjamin Mako Hill}
68 \newcommand{\ID}{\officename}
69 \newsavebox{\OfficeStuff}
70 \newsavebox{\MITlogo}
71 \newsavebox{\contactinfo}
72 \newsavebox{\phonestuff}
73
74
75 \sbox{\OfficeStuff}
76      {\parbox[t]{7.41cm}{\setlength{\baselineskip}{9.2pt}{\boldfont \person}\\\regularfont{\officename}}}
77
78 \sbox{\MITlogo}
79      {\parbox[t]{2.19cm}
80        {\raisebox{-7mm}{\scalebox{.3}{\includegraphics{figures/mitlogo.pdf}}}}}
81 \sbox{\contactinfo}
82      {\parbox[t]{7.37cm}
83        {\setlength{\baselineskip}{9.2pt}\vspace{-0.8em}{\boldfont{\color{mitred} Massachusetts Institute of Technology}}\\
84          \regularfont{77 Massachusetts Avenue, \roomnumber\\
85            Cambridge, Massachusetts 02139-4307}}}
86 \sbox{\phonestuff}
87      {\parbox[t]{7.37cm}{\setlength{\baselineskip}{9.2pt}\regularfont{Phone\hspace{2mm}\phonenum\\Fax\hspace{5.5mm}\faxnum\\Email\hspace{2mm} \email\\\website}}}
88 \newsavebox{\nameandtitle}
89 \sbox{\nameandtitle}
90      {\parbox[t]{3in}{\setlength{\baselineskip}{9.2pt}}}
91 \newsavebox{\header}
92 \arrayrulecolor{mitred}
93 \setlength{\arrayrulewidth}{2pt}
94 \sbox{\header}
95      {\parbox[t]{\textwidth}
96        {\begin{tabular*}{\textwidth}{lll@{\extracolsep{\fill}}}
97          \usebox{\OfficeStuff} & \raisebox{.05in}{\usebox{\MITlogo}} & \usebox{\contactinfo} \\
98          &&\\
99          \hline\\
100          \usebox{\nameandtitle}&&\usebox{\phonestuff}
101      \end{tabular*}}}
102
103 \newsavebox{\footer}
104
105 \sbox{\footer}
106      {\parbox[t]{\textwidth}{\textcolor{mitred}{\rule{\textwidth}{3mm}}}}
107 \newsavebox{\envpic}
108 \sbox{\envpic}
109      {\parbox[t]{.75in}
110        {\scalebox{.33}{\includegraphics{figures/mitlogo.pdf}}}}
111 \newsavebox{\envtop}
112 \sbox{\envtop}
113      {\parbox[t]{2.5in}
114        {\setlength{\baselineskip}{9.2pt}\boldfont{{\color{mitred} \officename}\\\associateofficename}}}
115
116 \newsavebox{\envbottom}
117 \sbox{\envbottom}
118      {\parbox[b]{2.5in}
119        {\setlength{\baselineskip}{9.2pt}\boldfont{\color{mitred} Massachusetts Institute of Technology}\\\regularfont{77 Massachusetts Avenue, Building \roomnumber}\\\regularfont{Cambridge, MA 02139-4307}}}
120
121 \newsavebox{\envelope}
122 \sbox{\envelope}
123      {\parbox[t]{3.25in}
124        {\hspace{.75in}\raisebox{.125in}{\usebox{\envtop}}\\\textcolor{mitred}{\rule{3.25in}{2pt}}\\\\\usebox{\envpic}\usebox{\envbottom}}}
125
126 \renewcommand{\returnaddress}{\protect\usebox{\envelope}}
127
128 %make sure the header goes on the first page
129 \renewcommand{\ps@firstpage}
130              {\setlength{\headheight}{70pt}\setlength{\headsep}{25pt}%
131                \renewcommand{\@oddhead}{\usebox{\header}}%
132                \renewcommand{\@evenhead}{}\renewcommand{\@evenfoot}{\usebox{\footer}}\renewcommand{\@oddfoot}{\usebox{\footer}}}
133 \renewcommand{\ps@plain}{%
134 \renewcommand{\@evenfoot}{\usebox{\footer}}\renewcommand{\@oddfoot}{\usebox{\footer}}
135 }
136
137 \providecommand{\@evenhead}{}\providecommand{\@oddhead}{}
138 \providecommand{\@evenfoot}{}\providecommand{\@oddfoot}{}
139
140
141 \pagestyle{headings}

Benjamin Mako Hill || Want to submit a patch?