next up previous contents
Next: Commands for class and Up: The structure of a Previous: Example: a local letter

Example: a newsletter class

A simple newsletter can be typeset with LATEX, using a variant of the article class. The class begins by announcing itself as smplnews.cls.
   \ProvidesClass{smplnews}[1995/04/01 The Simple News newsletter class]

It passes most specified options on to the article class: apart from the onecolumn option, which is switched off, and the green option, which sets the headline in green.


It then loads the class article with the option twocolumn.
Since the newsletter is to be printed in colour, it now loads the color package. The class does not specify a device driver option since this should be specified by the user of the smplnews class.
The class then redefines \maketitle to produce the title in 72pt Helvetica bold oblique, in the appropriate colour.
It redefines \section and switches off section numbering.
         {section}{1}{0pt}{-1.5ex plus -1ex minus -.2ex}%
         {1ex plus .2ex}{\large\sffamily\slshape\headlinecolor}%
It also sets the three essential things.
In practice, a class would need more than this: it would provide commands for issue numbers, authors of articles, page styles and so on; but this skeleton gives a start. The ltnews class file is not much more complex than this one.

LaTeX3 Mail Server