\NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{UIlh}[2004/01/26 Univ of Iowa letterhead] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % UIlh.cls % % Author Russ Lenth % % Version 1.4 January 26, 2004 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Root name of masthead graphic file \newcommand{\UIlogo}{UI-stat-masthead} % File name for UI logo PostScript file %%% Options \newcommand{\@sigpic}{} % default signature "graphic" \newcommand{\@sigput}{\put(0,0)} % signature location in inches \newcommand{\@usecmfont}{0} \DeclareOption{signed}{ \renewcommand{\@sigpic}{\includegraphics{\SigPic}} \renewcommand{\@sigput}{\SigPut}} \DeclareOption{initialed}{ \renewcommand{\@sigpic}{\includegraphics{\InitPic}} \renewcommand{\@sigput}{\InitPut}} \DeclareOption{firstname}{ \renewcommand{\@sigpic}{\includegraphics{\NickPic}} \renewcommand{\@sigput}{\NickPut}} \DeclareOption{cmfonts}{ \renewcommand{\@usecmfont}{1}} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} \ProcessOptions\relax %%% Use article as base class (with any leftover options) \LoadClass{article} \RequirePackage{graphics} \RequirePackage{ifthen} \ifthenelse{\@usecmfont = 1}{}{\RequirePackage{bookman}} %%% Fonts \DeclareFixedFont{\footfont}{OT1}{phv}{m}{n}{7} \newcommand{\memofont}{\large\sc} %%% Fancy hack to put extra space between characters %%% Usage: \extend{STRING TO BE STRETCHED} \def\@mygap{\rule{.5pt}{0pt}} \def\extend#1{\@extend#1~} \def\@extend#1{\@ifnextchar~{#1}{#1\@mygap\@extend}} %%% Macros to allow for blocking of masthead or footer \def\noHead{\gdef\@usehead{0}} \def\noFoot{\gdef\@usefoot{0}} \def\@usehead{1} \def\@usefoot{1} %%% Internal macros to be used later \newcommand{\@signature}{\me\\*\mytitle} \renewcommand{\to}[2]{\def\@to{#1}\def\@toaddr{#2}} \to{~}{~} %%% initialize, just in case \def\@putSig{\begin{picture}(0,0)\@sigput{\@sigpic}\end{picture}} \clearpage\raggedright% \setlength{\parindent}{0pt}% \setlength{\parskip}{12pt}% \setlength{\oddsidemargin}{0in}% \setlength{\evensidemargin}{\oddsidemargin}% \setlength{\textwidth}{6.75in}% \setlength{\topmargin}{-.5in}%{0pt}% \setlength{\headheight}{12pt}% \setlength{\headsep}{24pt}% \setlength{\footskip}{25pt}% \setlength{\textheight}{9.4in}%{8.75in}% \large\normalsize \newlength{\@part@skip} \setlength{\@part@skip}{2\parskip plus .5\parskip minus \parskip} \setlength{\unitlength}{1in}%%% for picture environments %%% This macro initializes the page parameters and %%% draws the letterhead. %%% The argument is what is put under the gold bar \newcommand{\makeLetterhead}[1]{% \clearpage \thispagestyle{empty}\setcounter{page}{1}% \begin{picture}(3,1.0)%%%(3,.5)% \put(0,0){#1} \ifthenelse{\@usehead = 1}{\put(-.325,.335){\includegraphics{\UIlogo}}}{} \ifthenelse{\@usefoot = 1}{\put(4.5,-8.5){\@myfoot}}{} \end{picture} \enlargethispage{-.5in}} %%% Opening of the letter \newcommand{\opening}[1]{% \makeLetterhead{\today}% \vspace{\parskip}\vfill {\raggedright \@to \\ \@toaddr}\par%%% \\*[\@part@skip] {\def\\{\noexpand\\}\def~{\noexpand~}\def\emph{\noexpand\emph}% \def\em{\noexpand\em}\def\bf{\noexpand\bf}% \immediate\write12{\noexpand\envelope|\@to \\ \@toaddr|Russell V.~Lenth|}}%%%%%% (Put entry in the envelope file) \markright{{\@to: \today}} #1\par\nobreak} %%% Closing of the letter \newcommand{\closing}[1][\sincerely]{% \vspace{\@part@skip}\par \nobreak \parbox{.95\textwidth}{% \@putSig% #1,\vspace{.55in} \@signature}\vfill\vfill} %%% \memo{TO}{FROM}{TOPIC} %%% %%% Note the custom macro \me (see above) is handy for the FROM argument \newcommand{\memo}[3]{% \to{Memorandum}{}% \makeLetterhead{{\memofont Memorandum}}% \vspace{\parskip}\par \markright{{{\sc Memorandum} to #1: \today}} {\raggedright \begin{picture}(0,0)\put(2.5,-.4){\@sigpic}\end{picture}% \makebox[.65in][l]{To:}\parbox[t]{5in}{#1}\\[8pt] \makebox[.65in][l]{From:}\parbox[t]{5in}{#2}\\[8pt] \makebox[.65in][l]{Date:}\today\\[8pt] \makebox[.65in][l]{Topic:}\parbox[t]{5in}{#3}\vspace{\parskip}% \par\nobreak}} %%% \fax{TO}{FROM}{TOPIC}{FAX NO}{PAGES} \newcommand{\fax}[5]{% \makeLetterhead{{\memofont FAX Transmission for #1}} \vspace{\parskip}\par \markright{{{\sc FAX transmission} for #1: \today}} {\raggedright {\bf Number of pages (including this sheet):\quad#5}\\ If there are problems with this transmission, please call \me, \phone \begin{picture}(0,0)\put(2.5,-.7){\@sigpic}\end{picture}% \makebox[1in][l]{To:}#1\\[8pt] \makebox[1in][l]{FAX no.:}#4\\[8pt] \makebox[1in][l]{From:}#2\\[8pt] \makebox[1in][l]{Date:}\today\\[8pt] \makebox[1in][l]{Topic:}\parbox[t]{5in}{#3}\vspace{\parskip}% \par\nobreak}} %%% Commands for CCs and enclosures. %%% \encl generalizes, as can be seen in def of \cc \newcommand{\encl}[2][encl:]{\par\nobreak\makebox[.5in][l]% {#1}\parbox[t]{6in}{#2}} \newcommand{\cc}[1]{\encl[cc:]{#1}} %%% The page style for subsequent pages %%% (note that \opening and \memo set \thispagestyle{empty}) \pagestyle{myheadings} %%% Needed information %%% Customize in letterinfo.sty \newcommand{\sincerely}{Sincerely yours} \newcommand{\me}{Joe Schmo} \newcommand{\email}{joe-schmo@uiowa.edu} \newcommand{\mytitle}{Title} \newcommand{\phone}{319-335-0712} \newcommand{\personal}{% \extend{Joe\ Schmo}\\ \extend{200\ Schaeffer\ Hall}\\ \extend{319-335-0000}\\ \extend{joe-schmo@uiowa.edu}} %%% Temporary directory (works in UNIX but not in Windows) \newcommand{\tmpdir}{/tmp/} %%% Read personal information \InputIfFileExists{letterinfo.sty}{}{% \ClassWarningNoLine{UIlh}{% No letterinfo.sty file found. \MessageBreak \space \space No personal information will be included in the letterhead. } } %%% Set up footer \newcommand{\@footinfo}{{\footfont\def\arraystretch{.667}% \begin{tabular}[b]{@{}l@{}}\personal\end{tabular}}} \newlength{\@footht} \settoheight{\@footht}{\@footinfo} \addtolength{\@footht}{-1.5pt} \newcommand{\@myfoot}{\rule{2.8pt}{\@footht}\hspace{.125in}\@footinfo} %%% Set up envelope file \AtBeginDocument{\immediate\openout 12 = \tmpdir envelope.data} \AtEndDocument{\closeout 12}