1
% (c) Copyright on FAX.CLS written by J.B.Rhebergen and J.H.M. de Jonge.
3
% You are allowed to make modification to this FAX.CLS and redistribute it
4
% under the following conditions:
5
% 1) You leave this top message intact.
6
% 2) You send me an updated version with your changes and an
7
% explanation/motivation.
8
% 3) You ask no money for it.
10
% This document class comes with no waranty whatsoever! Comments and
11
% suggestion are most welcome.
13
% Mail me at: J.B.Rhebergen@ET.TUDelft.NL
14
% or: rheberg@morra.et.tudelft.nl
20
\NeedsTeXFormat{LaTeX2e}
21
\ProvidesClass{fax}[1995/07/18 v1.0 by: J.B. Rhebergen & J.H.M. de Jonge]
22
\IfFileExists{lastpage.sty}{\RequirePackage{lastpage}}{%
23
\typeout{Warning: I did not find lastpage.sty,
24
use \string\setcounter{\string\faxpages}{..} instead!}}
26
\newif\if@note\@notefalse
27
\newif\if@topsep\@topseptrue
29
\newcommand{\slsf}{\sffamily\slshape}
30
\newcommand{\bsf}{\sffamily\bfseries}
32
\newcommand{\@lstpgno}{%
33
\@ifundefined{r@LastPage}{0}{%
34
\expandafter\expandafter\expandafter
35
\@cdr\csname r@LastPage\endcsname
39
\newcommand{\@to}{\typeout{Warning: The \string{\to} command is not defined!}}
40
\newcommand{\@from}{\IfFileExists{from.fax}{\input{from.fax}}{%
41
\typeout{Warning: I did not find from.fax, use \string\from{..} in your document!}}}
42
\newcommand{\@note}{\IfFileExists{note.fax}{\input{note.fax}}{%
43
\typeout{Warning: I did not find note.fax, use \string\note{..} in your document!}}}
44
\newcommand{\@fxtxt}{{\Large\sc Tele-Fax Message}}
45
\newcommand{\@dtxt}{Date:}
46
\newcommand{\@ntxt}{Note:}
47
\newcommand{\@ptxt}{page}
48
\newcommand{\@pptxt}{pages}
50
\newcommand{\@nothing}{}
51
\newcommand{\mymsg}[1]{\renewcommand{\@fxtxt}{#1}}
52
\renewcommand{\to}[1]{\renewcommand{\@to}{#1}}
53
\newcommand{\from}[1]{\renewcommand{\@from}{#1}}
54
\newcommand{\note}[1]{\renewcommand{\@note}{#1}}
56
\DeclareOption{dutch}{
57
\renewcommand{\@from}{\IfFileExists{van.fax}{\input{van.fax}}{%
58
\typeout{Warning: I did not find van.fax, use \string\from{..} in your document!}}}
59
\renewcommand{\@note}{\IfFileExists{nb.fax}{\input{nb.fax}}{%
60
\typeout{Warning: I did not find nb.fax, use \string\note{..} in your document!}}}
61
\renewcommand{\@fxtxt}{{\Large\sc Fax Boodschap}}
62
\renewcommand{\@dtxt}{Datum:}
63
\renewcommand{\@ntxt}{NB:}
64
\renewcommand{\@ptxt}{pagina}
65
\renewcommand{\@pptxt}{paginas}}
67
\DeclareOption{note}{\@notetrue}
68
\DeclareOption{nosep}{\@topsepfalse}
70
\DeclareOption*{\IfFileExists{artikel3.cls}
71
{\PassOptionsToClass{\CurrentOption}{artikel3}}
72
{\PassOptionsToClass{\CurrentOption}{article}}}
76
\IfFileExists{artikel3.cls}{\LoadClass{artikel3}}{%
77
\typeout{Warning: I did not find artikel3.cls, I loaded article.cls instead!}
80
\newlength{\faxtopsep}
81
\setlength{\faxtopsep}{3ex}
87
\setlength{\@framewd}{\textwidth}
89
\setlength{\@sep}{0.5em}
90
\addtolength{\@framewd}{-0.5\@sep}
94
\setbox\@frombx=\hbox{\@from}
95
\setbox\@tobx=\hbox{\@to}
102
\ifdim\@tmpdim>\@thinht
106
\ifdim\@tmpdim>\@thindp
109
\setbox\@thin=\hbox{\vrule width 0mm height \@thinht depth \@thindp}
111
\ifx\@fxtxt\@nothing\relax\else\@fxtxt\strut\\\fi
112
\framebox[0.5\@framewd][t]{\copy\@thin\copy\@tobx}\hfill%
113
\framebox[0.5\@framewd][t]{\copy\@thin\copy\@frombx}\\
116
\framebox[0.5\@framewd]{{\bsf \@dtxt} \today\strut}\hfill
118
\framebox[0.5\@framewd]{{\bsf Fax:} \thefaxpages\ page(s)\strut}\\
120
\framebox[0.5\@framewd]{{\bsf Fax:} \pageref{LastPage} \@ptxt\strut}\\
122
\framebox[0.5\@framewd]{{\bsf Fax:} \pageref{LastPage} \@pptxt\strut}\\
127
\addtolength{\@framewd}{-1em}
128
\framebox[\textwidth][c]{\hfill
129
\begin{minipage}{\@framewd}\fbox{\small\bsf \@ntxt} \@note\strut\hfill
130
\end{minipage}\hfill}
133
\if@topsep\vspace{\faxtopsep}\fi