Document 297

The link between .shl and .cst files

Version: 3.x, 4.x, 5.x - Scientific WorkPlace & Scientific Word

Problem

You've created a shell (.shl) file and saved it in a new subdirectory in the Shells directory of your program installation. You've also created a style (.cst) file and saved it in a new subdirectory in the Styles directory. You can create a new document with the shell, but can't make permanent changes to the tag appearances in the .cst file. The system either doesn't accept the change or seems to update the wrong .cst file.

Explanation

Shell files are completely standard SWP/SW LaTeX files. You can create subdirectories in the Shells directory of your installation and you can place your own shells there. These shells then appear in the New dialog when you choose New from the File menu.

However, there is an essential restriction regarding where .cst files may reside. Your .cst file must reside in one of only three places:

  • In the subdirectory of the Styles directory that has the same name as the base LaTeX class of your document.

  • In the Styles\[Special] subdirectory. The [Special] subdirectory is a catchall directory for one-time styles that have unique sets of elements (headings or other tags).

  • In the same directory as the document itself. This option is therefore not available for .shl files.

For example, if the base class is article, the .cst file must be placed in Styles\article or in Styles\[Special]. If the .cst file is placed anywhere else, the program won't be able to locate it when the shell file is chosen from the File/New dialog.

If you place the .cst file in Styles\article, you can switch to any of the other .cst files in the directory by choosing Style from the File menu and then choosing the style you want.

If you place the .cst file in Styles\[Special], the system uses the .cst file correctly, but you can't use the Style command to select any of the other .cst files in Styles\[Special], because the [Special] directory contains one-time styles.

Solution

To associate a .cst file with your new shell document:

  1. Save the new shell file in the appropriate subdirectory of \swp30\shells.

  2. From the File menu, choose New and then choose the new shell file.

  3. Choose OK.

  4. From the Tag menu, choose Appearance.

  5. Choose Save As.

  6. Enter a new name for the style and choose OK.

  7. From the File menu, choose Save.

  8. Name the file and in the Save as Type box, select Shell (*.shl).

  9. Select the appropriate subdirectory of Shells for your new shell and choose OK.

The new design has two goals:

  1. To separate .shl and .cst files, so that it is much easier to make new shells.

    Try placing any LaTeX file in a subdirectory of Shells, giving it the .shl extension—it will be available in the New dialog box. There are no complicated .lat files to connect things, and there is no special processing of the shell file at load time. The system simply makes a copy of the file and uses the .tex extension when saving.

  2. To make it much harder to use a .cst file that is incompatible with a document.

    This was a source of many user problems in previous versions. If you hand edit a .cst file and create new elements, you should place it in Styles\[Special] or use a different base class and place it in the subdirectory of Styles with that base class name. We no longer offer the option from within SWP/SW to choose another style. You can do this using an ASCII editor, but if you do this, you're very aware of it and therefore of the likely problems.

Last revised 06/29/06

This document was created with Scientific WorkPlace.