1 %% This is csc-letterhead.sty, which is the LaTeX 2e package for
2 %% Computer Science Club letterheads.
3 %% Copyright (C) 2003 Computer Science Club of the University of Waterloo
5 %% This program is free software; you can redistribute it and/or modify
6 %% it under the terms of the GNU General Public License as published by
7 %% the Free Software Foundation; either version 2 of the License, or
8 %% (at your option) any later version.
10 %% This program is distributed in the hope that it will be useful,
11 %% but WITHOUT ANY WARRANTY; without even the implied warranty of
12 %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 %% GNU General Public License for more details.
15 %% You should have received a copy of the GNU General Public License
16 %% along with this program; if not, write to the Free Software
17 %% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 %% Requirements: You must have tetex-extra installed on your system.
20 %% This package should be used in conjunction with letter.cls and
23 %% If you wish to generate csclogo.pdf for the first time, you ought to
24 %% run `pdflatex -shell-escape myfile.tex` to allow PDFTeX to execute shell
25 %% commands. This is only useful if you are invoking PDFLaTeX.
30 %% -- Simon Law <sfllaw@engmail.uwaterloo.ca> Sun, 19 Jan 2003 22:06:17 -0500
32 \NeedsTeXFormat{LaTeX2e}
33 \ProvidesPackage{csc-letterhead}[2003/01/19 v1.0]
38 \RequirePackage{letterhead}
39 \RequirePackage{graphics}
43 %%%%%%%%%%%%%%%%%%%%%%%%%%%
44 %% DEFINE NEW SUBSTITUTIONS
45 %%%%%%%%%%%%%%%%%%%%%%%%%%%
46 \newcommand*{\email}[1]{\def\fromemail{#1}}
47 \newcommand*{\website}[1]{\def\websiteurl{#1}}
49 \website{\url{http://www.csclub.uwaterloo.ca}}
50 \location{200 University Ave. W., MC 3036/3037, Waterloo, ON. N2L 3G1.}
51 \telephone{(519) 888-4567 x3870.}
53 \RequirePackage{ifpdf}
55 \RequirePackage{epstopdf}
58 % Caculate the width of the logo, and how much space is left over.
60 \sbox{\csclogo}{\resizebox{!}{3\baselineskip}{\includegraphics{csclogo}}}
61 \newlength{\csclogowidth}
62 \newlength{\notlogowidth}
63 \settowidth{\csclogowidth}{\usebox{\csclogo}}
64 \setlength{\notlogowidth}{\textwidth}
65 \addtolength{\notlogowidth}{-\csclogowidth}
70 \renewcommand{\letterhead}{%
72 \parbox{\csclogowidth}{\usebox{\csclogo}}%
73 \parbox{\notlogowidth}{%
74 \mbox{} \hfill \fromname\\
75 \mbox{} \hfill \fromoffice\\
76 \mbox{} \hfill \fromemail
85 \renewcommand{\letterfoot}{%
87 \centerline{\makebox[0.8\textwidth]{\hrulefill}}%
88 \fromlocation \hfill \telephonenum\\%
89 \centerline{\websiteurl}%