1 \NeedsTeXFormat{LaTeX2e}
2 \ProvidesClass{mitletter3}
3 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{letter}}
6 \usepackage[dvips]{graphics}
7 \usepackage[businessenvelope]{envlab}
10 \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
11 \definecolor{mitred}{RGB}{128,0,0}
15 \setlength{\topmargin}{-.80in}
16 \setlength{\oddsidemargin}{-.25in}
17 \setlength{\evensidemargin}{-.25in}
18 \setlength{\textwidth}{7in}
19 \setlength{\textheight}{8in}
20 \setlength{\headsep}{1in}
21 \setlength{\footskip}{1.125in}
23 \DeclareFixedFont{\boldfont}{OT1}{cmss}{bx}{n}{8}
24 \DeclareFixedFont{\regularfont}{OT1}{cmss}{m}{n}{8}
25 \DeclareFixedFont{\italicfont}{OT1}{cmr}{m}{it}{10}
27 \renewcommand*{\opening}[1]{\ifx\@empty\fromaddress
28 \thispagestyle{firstpage}%
29 {\raggedleft\@date\par}%
31 \thispagestyle{empty}%
32 {\raggedleft\begin{tabular}{l@{}}\ignorespaces
33 \fromaddress \\*[2\parskip]%
34 \@date \end{tabular}\par}%
37 {\raggedright \toname \\ \toaddress \par}%
40 \renewcommand{\ps@headings}{%
41 \let\@oddfoot\@empty\let\@evenfoot\@empty
42 \def\@oddhead{\slshape\headtoname{} \ignorespaces\toname
44 \hfil \pagename{} \thepage}%
45 \let\@evenhead\@oddhead}
46 \renewcommand*{\opening}[1]{\ifx\@empty\fromaddress
47 \thispagestyle{firstpage}%
50 \thispagestyle{empty}%
51 {\raggedleft\begin{tabular}{l@{}}\ignorespaces
52 \fromaddress \\*[2\parskip]%
53 \@date \end{tabular}\par}%
56 {\raggedright \toname \\ \toaddress \par}%
59 \renewcommand*{\signature}[1]{\def\fromsig{\italicfont #1}}
60 \newcommand{\officename}{Office Name}
61 \newcommand{\associateofficename}{Associate office name (optional)}
62 \newcommand{\roomnumber}{X00-000}
63 \newcommand{\phonenum}{617.000.0000}
64 \newcommand{\faxnum}{617.000.0000}
65 \newcommand{\website}{web.mit.edu/abcdefghijk}
66 \newcommand{\email}{user@mit.edu}
67 \newcommand{\person}{Your name}
68 \newcommand{\ID}{Your title}
69 \newsavebox{\OfficeStuff}
71 \newsavebox{\contactinfo}
72 \newsavebox{\phonestuff}
76 {\parbox[t]{7.41cm}{\setlength{\baselineskip}{9.2pt}\boldfont{\officename\\{\color{mitred} \associateofficename}}}}
80 {\raisebox{-7mm}{\scalebox{.3}{\includegraphics{mitlogo-clr.eps}}}}}
83 {\setlength{\baselineskip}{9.2pt}{\boldfont{\color{mitred} Massachusetts Institute of Technology}}\\
84 \regularfont{77 Massachusetts Avenue, \roomnumber\\
85 Cambridge, Massachusetts 02139-4307}}}
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}
90 {\parbox[t]{3in}{\setlength{\baselineskip}{9.2pt}\boldfont{\person }\\\regularfont{\ID }}}
92 \arrayrulecolor{mitred}
93 \setlength{\arrayrulewidth}{2pt}
95 {\parbox[t]{\textwidth}
96 {\begin{tabular*}{\textwidth}{lll@{\extracolsep{\fill}}}
97 \usebox{\OfficeStuff} & \raisebox{.05in}{\usebox{\MITlogo}} & \usebox{\contactinfo} \\
100 \usebox{\nameandtitle}&&\usebox{\phonestuff}
106 {\parbox[t]{\textwidth}{\color{mitred} \rule{\textwidth}{3mm}}}
110 {\scalebox{.33}{\includegraphics{mitlogo-clr.eps}}}}
114 {\setlength{\baselineskip}{9.2pt}\boldfont{\officename\\\associateofficename}}}
116 \newsavebox{\envbottom}
119 {\setlength{\baselineskip}{9.2pt}\boldfont{Massachusetts Institute of Technology}\\\regularfont{77 Massachusetts Avenue, Building \roomnumber}\\\regularfont{Cambridge, MA 02139-4307}}}
121 \newsavebox{\envelope}
124 {\hspace{.75in}\raisebox{.125in}{\usebox{\envtop}}\\\textcolor{mitred}{\rule{3.25in}{2pt}}\\\\\usebox{\envpic}\usebox{\envbottom}}}
126 \renewcommand{\returnaddress}{\protect\usebox{\envelope}}
131 %make sure the header goes on the first page
132 \renewcommand{\ps@firstpage}
133 {\setlength{\headheight}{70pt}\setlength{\headsep}{25pt}%
134 \renewcommand{\@oddhead}{\usebox{\header}}%
135 \renewcommand{\@evenhead}{}\renewcommand{\@evenfoot}{}\renewcommand{\@oddfoot}{\usebox{\footer}}}
137 \providecommand{\@evenhead}{}\providecommand{\@oddhead}{}
138 \providecommand{\@evenfoot}{}\providecommand{\@oddfoot}{}