%%% ====================================================================
%%%  @LaTeX-file{
%%%     author          = "Alan Jeffrey",
%%%     version         = "1.500",
%%%     date            = "16 September 1995",
%%%     time            = "17:37:14 BST",
%%%     filename        = "fontinst.cls",
%%%     address         = "School of Cognitive and Computing Sciences
%%%                        University of Sussex
%%%                        Brighton BN1 9QH
%%%                        UK",
%%%     email           = "alanje@cogs.sussex.ac.uk",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "font installation PostScript documentation",
%%%     supported       = "yes",
%%%     abstract        = "This is the document class for the fontinst
%%%                        font installation documentation.",
%%%     package         = "fontinst",
%%%     dependencies    = "article.cls"
%%%  }
%%% ====================================================================

% This is the document class for the fontinst package.
%
% It's an example of a one-off hacked-out document class.  Feel free
% to use it as the basis of your own document classes, but be warned I
% may completely change the document layout in future versions!

% Copyright 1995 Alan Jeffrey

% First of all, declare ourselves.

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{fontinst}[1995/09/16 Fontinst documentation class]

% Then load the article class.

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions
\LoadClass{article}

% Set everything in Palatino, with Times for mathematics and Helvetica
% typewriter. 

\RequirePackage{mathptm}
\RequirePackage[T1]{fontenc}
\renewcommand{\rmdefault}{ppl}
\renewcommand{\ttdefault}{phv}

% Scale Helvetica down by 10%

\DeclareFontFamily{T1}{phv}{}
\DeclareFontShape{T1}{phv}{m}{n}{<->s*[.9] phvr8t}{}
\DeclareFontShape{T1}{phv}{b}{n}{<->s*[.9] phvb8t}{}
\DeclareFontShape{T1}{phv}{m}{sl}{<->s*[.9] phvro8t}{}
\DeclareFontShape{T1}{phv}{b}{sl}{<->s*[.9] phvbo8t}{}
\DeclareFontShape{T1}{phv}{bx}{n}{<->ssub * phv/b/n}{}
\DeclareFontShape{T1}{phv}{m}{it}{<->ssub * phv/m/sl}{}
\DeclareFontShape{T1}{phv}{bx}{it}{<->ssub * phv/b/sl}{}

% Stuff for the front page:

\RequirePackage{graphics}

\renewcommand{\maketitle}{{%
   \normalfont
   \centering
   \cleardoublepage
   \thispagestyle{empty}%
   \raisebox{0pt}[\height][0pt]{%
      \resizebox{\textwidth}{!}{\textit{\@title}}%
   }%
   \par\bigskip
   \Large{\textbf{\@subtitle}}%
   \vfill
   \resizebox{\textwidth}{!}{\includegraphics{\@illustration}}%
   \vfill
   \textbf{%
      \@author \quad\textperiodcentered\quad 
      \@title~v\@version \quad\textperiodcentered\quad 
      \@date%
   }%
   \clearpage
   \addtocounter{page}{-1}%
}}

\newcommand{\subtitle}[1]{\renewcommand{\@subtitle}{#1}}
\newcommand{\version}[1]{\renewcommand{\@version}{#1}}
\newcommand{\illustration}[1]{\renewcommand{\@illustration}{#1}}

\newcommand{\@subtitle}{}
\newcommand{\@version}{???}
\newcommand{\@illustration}{cover.eps}

% Page dimensions:

\RequirePackage{calc}

\setlength{\textwidth}{.7\paperwidth}
\setlength{\evensidemargin}{((\paperwidth-\textwidth)/2)-1in}
\setlength{\oddsidemargin}{\evensidemargin}

\setlength{\textheight}{.75\paperheight}
\setlength{\topmargin}{(\paperheight-\textheight)/5*3-\headsep-\headheight-1in}

\setlength{\hfuzz}{1pt}

% A bit more space beneath captions.

\setlength{\belowcaptionskip}{\medskipamount}

% Running heads.

\pagestyle{myheadings}
\AtBeginDocument{\markright{\small\itshape\@author\hfill\@title: \@subtitle\quad}}

% Set lists tighter.

\renewcommand{\@listI}{%
   \leftmargin\leftmargini
   \parsep\smallskipamount
   \topsep\abovedisplayskip
   \itemsep\smallskipamount
}

% Markup for syntax.

\newcommand{\vb}[1]{{\ttfamily\string#1}}
\renewcommand{\arg}[1]{%
   \texttt{\char`\{}%
   \textit{#1\/}%
   \texttt{\char`\}}%
   \penalty10
}
\newcommand{\psname}[1]{$\langle$#1$\rangle$}

\newenvironment{syntax}{%
   \setlength{\rightskip}{0pt plus 5em}%
   \setlength{\@rightskip}{\rightskip}%
   \description
}{%
   \enddescription
}

\newcommand{\syn}[1]{\item[%
   \begin{tabular}{@{}l}#1\end{tabular}
]\mbox{}\\}

% Hackery to get paths etc. to line-break.

\let\FAQverbFamily\ttfamily
\DeclareRobustCommand{\FAQverb}[2]{{%
    \ifvmode\leavevmode\fi
    \lefthyphenmin=256\setlanguage\language
    \FAQverbFamily\hyphenchar\the\font`#1\relax
    \def\@tempa{#2}%
    \expandafter\@faq@strip\meaning\@tempa\@faq@strip
    \hyphenchar\the\font\m@ne
}\setlanguage\language}
\def\@faq@strip#1->#2\@faq@strip{#2}

\makeatother
\def\Email|#1@#2|{\FAQverb\-{#1@}\penalty10\FAQverb\.{#2}} % email
\def\Emaildot|#1@#2|{\FAQverb\.{#1@}\penalty10\FAQverb\.{#2}}
\makeatletter
\def\FTP|#1|{\FAQverb\.{#1}}                               % FTP site
\def\File|#1|{\FAQverb\/{#1}}                              % file name
\def\CTAN{\FAQverb\/}                                      % CTAN path
\def\Newsgroup|#1|{\FAQverb\.{#1}}                         % newsgroup
\def\URL|#1://#2/#3|{\FAQverb\.{#1://#2/}\penalty10\FAQverb\/{#3}}
\def\path|#1|{\FAQverb\/{#1}}                              % generic path

% That's it!

