Document 678

Modifying the program interface for added document classes

Version: 5.x - Scientific WorkPlace & Scientific Word

When you add typesetting specifications to your installation, you can work with them directly from the Options and Packages dialog box by modifying the program interface. The modification is optional.

The modification involves adding information to two files in the Typeset directory of your program installation, classes.pkg and classes.opt. The classes.opt file contains a section for each available document class in the installation. Each section lists the options available for the class, like this:

[article]
1=Body text point size
1.1=10pt - default,
1.2=11pt,11pt
1.3=12pt,12pt
2=Paper size
2.1=8.5x11 - default,letterpaper
2.2=a4,a4paper
2.3=a5,a5paper
2.4=b5,b5paper
2.5=Legal size,legalpaper
2.6=Executive size,executivepaper

The first-level numbers indicate the option category. The second-level numbers indicate the option as it appears in the Options for documentclass dialog box, followed by a comma and the name of the option as defined in the class itself. Read the documentation for the document class to determine the available options, then modify the interface to include the new class:

  1. Modify the classes.pkg file so that you can select new packages required by the specifications.

  2. Modify the classes.opt file so you can select document class options:

    1. Using an ASCII editor, open the classes.opt file in the Typeset directory of your program installation.

    2. On a new line, enter the name of the new document class in square brackets and press Enter.

    3. For each option category, type a first-level entry in the form x=categoryname where x is the number of the category and categoryname is the category name as you want it to appear in the Options for documentclass dialog box.

    4. For each option category, type a series of second-level entries in the form x.y=optionname,option where x is the number of the category, y is the number of the option within the category, optionname is the description of the option as you want it to appear in the Options for documentclass dialog box, and option is the name of the option as it is defined in the document class. You can leave the option field blank.

    5. Save and close the file.

Last revised 06/15/06