Technical Support
Forums and Mailing Lists
Search Mackichan Web

SWP & SW
Version 5/5.5

Installation
Word Processing
Computations
Typesetting
File Issues
Graphics
Exam Builder
Style Editor
Other
Technical Articles

Scientific Notebook
Support Information
Troubleshooting

TeXnology
BibDB

Document 143

## How to change the formatting for styles not created with the SW Style Editor

Version: 2.5 - Scientific WorkPlace & Scientific Word

We often receive questions about changing the typeset appearance of styles not created with the SW Style Editor. These changes require the insertion of LaTeX commands in the preamble of the SW document. If you are familiar with LaTeX, you can probably make the changes easily, but you don't have to be a LaTeXpert to change

Note These instructions will help you tailor the typeset appearance of documents created with non-Style Editor styles. If you want to change the appearance of a document created with a Style Editor style, use the Style Editor to create a new style that incorporates the changes you want.

### Inserting LaTeX commands in the document preamble

If you're using SW version 2.0 or 2.01:

1. From the SW File menu, choose Doc Info and then choose LaTeX.

2. Enter the command in the LaTeX window after any commands that are already present.

3. Choose OK.

If you're using SW version 2.5:

1. From the SW File menu, choose Document Info and then choose the Preamble tab.

2. Click the mouse in the Preamble window so that any commands already present are no longer selected.

3. Enter the command in the Preamble window after any commands that are already present.

4. Choose OK.

### Changing the Margins

The commands discussed below will override the settings of the style you have selected and give you 1-inch margins on the top, bottom, left and right sides of a page printed on U.S. standard letter size pager.

These two commands control the top and bottom margins of the document:

\setlength{\topmargin}{0.0in}

\setlength{\textheight}{9.0in}

The first command causes the top margin to be set to 1 inch. The second command specifies the height of the text area on the page, in this case 9 inches. You can substitute different values depending on the margins and the text height you want. For example, if you want to increase the top margin to 1-1/2 inches, use a value of {0.5in} in the \topmargin command. If you want to reduce the top margin to 1/2 inch, use a value of {-0.5in}. Similarly, if you want to reduce the height of the text area to 8 inches, use a value of {8.0in} in the \textheight command. Be sure the total of the top margin and the text height is not greater that the height of the paper in your printer.

These three commands control the right and left margins:

\setlength{\evensidemargin}{0.0in}

\setlength{\oddsidemargin}{0.0in}

\setlength{\textwidth}{6.5in}

The first two commands control the margin at the unbound side of the page. Like the top margin command above, these sample commands set both left and right margins to 1 inch. The third command controls the width of the text area on the page, here 6-1/2 inches.

You can substitute different values depending on the margins and the text width you want. For example, if you want to increase the outside margin on an even-numbered page to 1-1/5 inches, use a value of {0.5in} in the \evensidemargin command. If you want to reduce the outside margin on an odd-numbered page to 1/2 inch, use a value of {-0.5in} in the \oddsidemargin command. Similarly, if you want to reduce the width of the text area to 4.5 inches, use a value of {4.5in} in the \textwidth command. Be sure the total of the side margin and the text width is not greater that the width of the paper in your printer.

### Removing the page numbers

If you have a 1-page document, you may prefer not to have the page numbered. You can remove page numbering from documents created with most typesetting styles using this command:

\pagestyle{empty}

Note, however, that this command does not work for the title page of any style.

### Double-spacing documents

Spacing commands differ depending on the LaTeX version supported by the style.

• To double-space documents created with LaTeX 2.09 styles:

1. From the File menu, choose Style and then choose Options.

2. In the Additional Options window, enter Doublesp.

• To double-space documents created with LaTeX 2e styles:

1. From the File menu, choose Style and then choose Go Native.

2. In the Packages window, enter {doublesp}.

### Setting margin alignment to flush right

You can align the margins of your text to the right ("flush right") with a command entered directly into your SW document at the point you want the text to be aligned at the right margin.

To right-justify a portion of text

1. Place the insertion point where you want the right justification to begin.

2. From the Insert menu, choose Field and then choose TeX.

3. In the TeX Field dialog box, enter \hfill.

4. Choose OK.

Note that although any text place on the line after the \hfill command will be right-justified, you must end the line with a hard return for the command to work properly.

### Using special characters in titles

At times you may want the title of your SW document to contain a special character, such as #, \$, %, &, ~, _,\, {, }, or ^. Since the title is entered in a TeX field, you must know the TeX equivalent of the character you want to enter. However, you can enter the character like this instead:

1. Type the character you want in the SW main window.

2. Highlight the character and press ctrl+insert simultaneously to copy the TeX equivalent of the character to the Windows clipboard.

3. From the File menu, choose File, then choose Front Matter, and then choose Title.

4. In the window, place the insertion point in the Title box, and press shift+insert to insert the contents of the clipboard inside the window.

5. Choose OK.

### Using LaTeX commands to change the size of a typeface for a limited portion of text

You can insert LaTeX commands in a TeX field in an SW 2.01 document to change the size of a short portion of text in your document. These commands, for which Text Tags are included in SW 2.5, change text size:

• \tiny

• \scriptsize

• \footnotesize

• \small

• \normalsize

• \large

• \Large

• \LARGE

• \huge

• \Huge

In LaTeX, commands that change the text size are used the same way commands that change the typestyle: they simply change size until another size-changing command is encountered. This example explains how to change a small portion of text to huge.

To change the size of the a small portion of text:

1. From the Insert command, choose Field and then choose TeX.

2. In the TeX Field window, enter {\huge This is your text.}

3. Choose OK.

SW inserts the appropriate text tag for the text.

Note that although commands that change the text size can also be used in combination with commands that change the typestyle, not all combinations will work. We urge you to experiment. Be sure to place commands that change the text size before commands that change the typestyle. Otherwise, the system will always produce text in Times Roman.

Note too that not all size commands work in Scientific Word because not all font sets are available for printing.

Revised 04/17/96, 08/07/06

This document was created with Scientific WorkPlace.

MacKichan Software, Inc. 19689 7th Avenue NE, Suite 183 #238 Poulsbo, WA 98370
Phone: 360-394-6033 Toll-free: 877-724-9673 Fax: 360-394-6039