LATEX 2ε for class and package writers
Copyright c© 1995–1998 The LATEX3 Project
All rights reserved
12 March 1999
Contents
1 Introduction
2
1.1 Writing classes and packages for LATEX 2ε
. . . . . . . . . . . . .
2
1.2 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
1.3 Further information
. . . . . . . . . . . . . . . . . . . . . . . . .
3
1.4 Policy on standard classes . . . . . . . . . . . . . . . . . . . . . .
4
2 Writing classes and packages
4
2.1 Old versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
2.2 Using ‘docstrip’ and ‘doc’ . . . . . . . . . . . . . . . . . . . . . .
5
2.3
Is it a class or a package? . . . . . . . . . . . . . . . . . . . . . .
5
2.4 Command names . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
2.5 Box commands and colour . . . . . . . . . . . . . . . . . . . . . .
6
2.6 Defining text and math characters
. . . . . . . . . . . . . . . . .
7
2.7 General style
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
3 The structure of a class or package
10
3.1
Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
3.2 Using classes and packages . . . . . . . . . . . . . . . . . . . . . .
11
3.3 Declaring options . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
3.4 A minimal class file . . . . . . . . . . . . . . . . . . . . . . . . . .
14
3.5 Example: a local letter class . . . . . . . . . . . . . . . . . . . . .
15
3.6 Example: a newsletter class . . . . . . . . . . . . . . . . . . . . .
15
4 Commands for class and package writers
16
4.1
Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
4.2 Loading files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18
4.3 Option declaration . . . . . . . . . . . . . . . . . . . . . . . . . .
18
4.4 Commands within option code
. . . . . . . . . . . . . . . . . . .
19
4.5 Moving options around . . . . . . . . . . . . . . . . . . . . . . . .
20
4.6 Delaying code . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
1
4.7 Opti