Document 185

How to change the screen appearance of a document

Version: 2.5 - Scientific WorkPlace & Scientific Word

Scientific WorkPlace and Scientific Word version 2.0 contains a Screen Appearance dialog box with which you can change the way some aspects of your document, such as the font and color used for text and math, appear in the SW window. Although the Screen Appearance dialog box is not a feature of version 2.5 of the software, you can change the screen appearance of your version 2.5 document by using an ASCII editor to modify the appropriate .cst file.

Remember: In SW, the way your document appears in print is a function of the document style you choose and has no relation to the screen appearance of the document.

Use the instructions below, which explain how to change the colors used to display your document on the screen, as an example of how to change other aspects of the screen appearance of your document.

Modifying the .cst file to change screen colors

In SW, different fonts are presented in different colors on the screen. Regular math, for example, appears in red. Colors are determined with an RGB (red, green, blue) scheme. Each color is assigned a value from 0 to 255. The combination of the values determines the color that appears on your screen. Follow these steps to change these values in the .cst file:

  1. Determine the .cst file for the SW document:

    1. Open the document.

    2. From the File menu, choose Style.

    3. In the LaTeX Style for Print and Preview dialog box, note the .cst file specification.

    4. Choose OK.

    5. Close the document and leave SW.

  2. Using an ASCII editor such as Notepad or Write, open the .cst file, which will be located in the styles subdirectory of your SW directory.

  3. Modify the on-screen color used for mathematics:

    1. Look through the file to find the [defaults] group.

    2. Find the line that reads MATH_COLOR=R255,G0,B0.

    3. Enter the RGB values for the color you want.

      These are the values for some common colors:

      Black: R0,B0,G0

      Blue: R0,G0,B255

      Blue Green: R0,G128,B128

      Light Green: R0, G128, B0

      Purple: R128,G0,B128

      Brown: R128,G128,B0

      Gray: R128,G128,B128

      Dark Gray: R64,G64,B64

      Green: R0,G255,B0

      Light Gray: R192,G192,B192

      Yellow: R255,G255,B0

      Magenta: R255,G0,B255

      Red: R255,G0,B0

      White: R255,G255,B255

      For example, to change the math color to blue, change the line to read MATH_COLOR=R0,G0,B255.

  4. Save and close the file

Note that the defaults that are set in the .cst file may be overwritten in certain environments. In a section head, for example, text is typically blue instead of black. You can change this as well, of course. Find the group entitled [section] and change the color specified in the TEXT_COLOR line.

You can use the approach outlined in the steps above to change the screen appearance of other types of fonts, such as Italic, small caps, and sans serif. Look for the appropriate group in the .cst file:

[em] Emphasize

[rm] Roman

[bf] Bold

[it] Italic

[sl] Slanted

[sf] Sans Serif

[sc] Small Caps

[tt] Typewriter

[tiny] Tiny

You can find more information about .cst files in the techref.tex file, located in the extras subdirectory of your SW installation.

A more general approach

Instead of modifying the .cst file for every document, you can modify a file called sciword.cst, which can be used with most SW styles. Then, to make sure that each style uses sciword.cst instead of the .cst file originally assigned to it, modify the .lat file located in the subdirectory for each document type. The document type subdirectories are located in the styles directory of your SW installation. (Note that the articles subdirectory has four .lat files: art1.lat for Math articles; art2.lat for Physics articles; art3.lat for Computer and Engineering articles; and art4.lat for Other articles.)

Follow these steps:

  1. Use an ASCII editor to open the sciword.cst file, which is located in the styles subdirectory of your SW installation.

  2. Modify the settings to achieve the screen appearance you want for your documents.

  3. Save and close the file.

  4. Modify the .lat file for each document type:

    1. Use an ASCII editor to open the .lat file.

    2. Find the line that begins CSTFILE=.

    3. Change the line so that it reads CSTFILE=sciword

    4. Save and close the file.

Please be aware that while modifying sciword.cst and the .lat files is easier than modifying a large number of .cst files, some inherent dangers are involved. For example, some article styles do not support chapter heads. Using the sciword.cst file will make a chapter head available from the Section/Body Tag pop-up list even though the style in use may not contain any formatting information for chapter heads.

A note about Style Editor styles

If you modify the .cst files associated with Style Editor styles, remember that there is a possibility that the Style Editor will overwrite the .cst file. To prevent this, open the Style Editor Save As dialog box, find the check box that reads Write .cst File, and make sure the box is unchecked.

Added 09/04/96

This document was created with Scientific WorkPlace.