]> projects.mako.cc - mit-stationery-latex/blob - mitletter1.cls
1ddb16d9a7d73e97d09853a4d7993c9ede6360a3
[mit-stationery-latex] / mitletter1.cls
1 \NeedsTeXFormat{LaTeX2e}
2 \ProvidesClass{mitletter1}
3 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{letter}}
4 \ProcessOptions
5 \LoadClass{letter}
6 \usepackage[dvips]{graphics}
7 \usepackage[businessenvelope]{envlab}
8
9 \raggedright
10 \setlength{\topmargin}{-1in}
11 \setlength{\oddsidemargin}{.25in}
12 \setlength{\evensidemargin}{.25in}
13 \setlength{\textwidth}{6.5in}
14 \setlength{\textheight}{8in}
15 \setlength{\headsep}{1in}
16 \setlength{\footskip}{1.625in}
17
18 \DeclareFixedFont{\boldfont}{OT1}{cmss}{bx}{n}{8}
19 \DeclareFixedFont{\regularfont}{OT1}{cmss}{m}{n}{8}
20 \DeclareFixedFont{\boldfontb}{OT1}{cmss}{bx}{n}{9}
21 \DeclareFixedFont{\regularfontb}{OT1}{cmss}{m}{n}{9}
22 \DeclareFixedFont{\italicfont}{OT1}{cmr}{m}{it}{10}
23
24
25 \renewcommand{\ps@headings}{% 
26   \let\@oddfoot\@empty\let\@evenfoot\@empty
27       \def\@oddhead{\slshape\headtoname{} \ignorespaces\toname
28                     \@date
29                     \hfil \pagename{} \thepage}%
30       \let\@evenhead\@oddhead}
31 \renewcommand*{\opening}[1]{\ifx\@empty\fromaddress
32   \thispagestyle{firstpage}%
33     \@date\\%
34   \else  % home address
35     \thispagestyle{empty}%
36     {\raggedleft\begin{tabular}{l@{}}\ignorespaces
37       \fromaddress \\*[2\parskip]%
38       \@date \end{tabular}\par}%
39   \fi
40   \vspace{2\parskip}%
41   {\raggedright \toname \\ \toaddress \par}%
42   \vspace{2\parskip}%
43   #1\par\nobreak\reversemarginpar\marginpar{\hspace*{.35in}\raisebox{.2in}{\scalebox{.33}{\includegraphics*{mitlogo.eps}}}\normalmarginpar}}
44 \renewcommand*{\signature}[1]{\def\fromsig{\italicfont #1}}
45 \newcommand{\officename}{Office Name}
46 \newcommand{\associateofficename}{Associate Office Name}
47 \newcommand{\roomnumber}{X00-000}
48 \newcommand{\phonenum}{617.000.0000}
49 \newcommand{\faxnum}{617.000.0000}
50 \newcommand{\website}{web.mit.edu/abcdefghijk}
51 \newcommand{\email}{user@mit.edu}
52 \newcommand{\person}{Your name}
53 \newcommand{\ID}{Your title}
54
55 \newsavebox{\headone}
56 \sbox{\headone}{\parbox[t]{2.5in}{\boldfont{Massachusetts Institute of Technology}}}
57 \newsavebox{\headtwo}
58 \sbox{\headtwo}
59      {\parbox[t]{2in}{\setlength{\baselineskip}{9.2pt}\boldfontb{\person}\\\regularfontb{\ID}}}
60 \newsavebox{\headthree}
61 \sbox{\headthree}
62      {\parbox[t]{2in}{\setlength{\baselineskip}{9.2pt}\boldfont{\officename}\\
63        \regularfont{Building \roomnumber}}}
64 \newsavebox{\headfour}
65 \sbox{\headfour}
66      {\parbox[t]{2in}{\setlength{\baselineskip}{9.2pt}\regularfont{77 Massachusetts Avenue}\\
67        \regularfont{Cambridge, Massachusetts}\\
68        \regularfont{02139-4307}}}
69 \newsavebox{\headfive}
70 \sbox{\headfive}
71      {\parbox[t]{2in}{\setlength{\baselineskip}{9.2pt}\regularfont{Phone \hspace{.13cm}\phonenum}\\
72        \regularfont{Fax \hspace{.47cm}\faxnum}\\
73        \regularfont{Email \hspace{.22cm}\email}\\
74        \regularfont{\website}}}
75 \newsavebox{\header}
76 \sbox{\header}
77      {\begin{tabular*}{\textwidth}{lll@{\extracolsep{\fill}}}
78          \usebox{\headone} & \usebox{\headtwo} & \usebox{\headfour} \\
79          & \usebox{\headthree} & \raisebox{-.1in}{\usebox{\headfive}}
80      \end{tabular*}}
81
82 \newsavebox{\envelope}
83 \sbox{\envelope}
84      {\parbox[t]{7cm}{\setlength{\baselineskip}{9.2pt}\boldfont{\officename\\\associateofficename\\\\Massachusetts Institute of Technology}\\\regularfont{77 Massachusetts Avenue, Building \roomnumber} \\\regularfont{Cambridge, MA 02139-4307} \\\\\\\\\\\\\\\\ \scalebox{.30}{\includegraphics*{mitlogo.eps}}}}
85
86 \renewcommand{\returnaddress}{\protect\usebox{\envelope}}
87
88
89 \renewcommand{\ps@firstpage}
90              {\setlength{\headheight}{70pt}\setlength{\headsep}{25pt}%
91                \renewcommand{\@oddhead}{\usebox{\header}}%
92                \renewcommand{\@evenhead}{}\renewcommand{\@evenfoot}{}}
93
94 \providecommand{\@evenhead}{}\providecommand{\@oddhead}{}
95 \providecommand{\@evenfoot}{}\providecommand{\@oddfoot}{}
96
97 \pagestyle{headings}

Benjamin Mako Hill || Want to submit a patch?