next up previous contents
Next: Example: a newsletter class Up: The structure of a Previous: A minimal class file

Example: a local letter class

A company may have its own letter class, for setting letters in the company style. This section shows a simple implementation of such a class, although a real class would need more structure.

The class begins by announcing itself as neplet.cls.

   \NeedsTeXFormat{LaTeX2e}
   \ProvidesClass{neplet}[1995/04/01 NonExistent Press letter class]
Then this next bit passes any options on to the letter class, which is loaded with the a4paper option.
   \DeclareOption*{\PassOptionsToClass{\CurrentOption}{letter}}
   \ProcessOptions\relax
   \LoadClass[a4paper]{letter}
In order to use the company letter head, it redefines the firstpage page style: this is the page style that is used on the first page of letters.
   \renewcommand{\ps@firstpage}{%
      \renewcommand{\@oddhead}{<letterhead goes here>}%
      \renewcommand{\@oddfoot}{<letterfoot goes here>}%
   }
And that's it!



Rainer Schoepf
Thu Jan 8 11:51:39 MET 1998