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.}
56 \begin{filecontents*}{csclogo.eps}
57 %!PS-Adobe-2.0 EPSF-1.2
58 %%Creator:Ian Goldberg
60 %%BoundingBox: 0 0 540 165
62 gsave %0 setlinecap 0 setlinejoin 1 setlinewidth
64 10 %% Half of the line width, where the circles have radius 60
65 %% Calculate the magic angles
66 dup dup dup 2 mul 30 sub exch 60 sub div dup dup mul 1 exch sub sqrt exch atan
67 /csclogomagic1 exch def
68 dup 2 mul 30 add exch 60 add div dup dup mul 1 exch sub sqrt exch atan
69 /csclogomagic2 exch def
72 130 95 60 csclogowid sub 0 180 csclogomagic1 sub arcn
73 70 95 60 csclogowid add csclogomagic2 360 arc
74 190 95 60 csclogowid sub 180 csclogomagic1 neg arcn
75 250 95 60 csclogowid add 180 csclogomagic2 add 180 arc
76 csclogowid dup add 0 rmoveto
77 250 95 60 csclogowid sub 180 csclogomagic1 180 add arcn
78 190 95 60 csclogowid add csclogomagic2 neg 180 arc
79 70 95 60 csclogowid sub 0 csclogomagic1 arcn
80 130 95 60 csclogowid add 180 csclogomagic2 sub 360 arc
82 /Helvetica findfont 48 scalefont setfont
83 (Computer) 330 115 moveto show
84 (Science) 330 75 moveto show
85 (Club) 330 35 moveto show
86 /Helvetica findfont 18 scalefont setfont
90 \RequirePackage{ifpdf}
92 \RequirePackage{epstopdf}
95 % Caculate the width of the logo, and how much space is left over.
97 \sbox{\csclogo}{\resizebox{!}{3\baselineskip}{\includegraphics{csclogo}}}
98 \newlength{\csclogowidth}
99 \newlength{\notlogowidth}
100 \settowidth{\csclogowidth}{\usebox{\csclogo}}
101 \setlength{\notlogowidth}{\textwidth}
102 \addtolength{\notlogowidth}{-\csclogowidth}
107 \renewcommand{\letterhead}{%
109 \parbox{\csclogowidth}{\usebox{\csclogo}}%
110 \parbox{\notlogowidth}{%
111 \mbox{} \hfill \fromname\\
112 \mbox{} \hfill \fromoffice\\
113 \mbox{} \hfill \fromemail
122 \renewcommand{\letterfoot}{%
124 \centerline{\makebox[0.8\textwidth]{\hrulefill}}%
125 \fromlocation \hfill \telephonenum\\%
126 \centerline{\websiteurl}%