Document 302

How to use the doublespace package

Version: 3.x - Scientific WorkPlace & Scientific Word

When you need to double space a document, you may be unable find a shell document that meets your needs and has double spaced text. Or you may need part of a document to be double spaced and other parts to be single spaced.

If you're using Version 3.0 or earlier of SWP or SW, your document may require that you use the doublespace package as outlined below. If you're using Version 3.5 or later, use the setspace package to change the typeset line spacing.

The line spacing when a document is typeset is determined by the designer of the typeset specification. Some typesetting specifications allow options that change the line spacing, such as options to typeset a document for manuscript or camera-ready appearance. The doublespace package can be used with many typesetting specifications to change the line spacing. The doublespace package will probably not work with Style Editor typesetting styles. Instead make changes to the typesetting style using the Style Editor.

Adding the doublespace package

  1. With your document open, select Typeset, Options and Packages, select the Package Options tab and click Add.

  2. Scroll down the list of available packages and select doublespace.

  3. Click OK to close the open dialogs.

or

  1. With your document open, select Typeset, Options and Packages, select the Package Options tab and click Add.

    If no list is displayed, the document class you are using does not include an interface to the doublespace package.

  2. Click the Go Native button.

  3. Add a new line to the Native LaTeX Packages dialog and type {doublespace}.

    Simply adding the doublespace package will change the typeset document to be double spaced.

Changing the spacing inside a document

The doublespace package defines three new environments that can be used to control the spacing inside the body of a document. The new environments are singlespace, onehalfspace and doublespace which provides single spaced text, one and a half spaced text and double spaced text, respectively. The new environments can be used in SW documents by inserting matching encapsulated TeX fields, the first TeX field starting the environment and the second TeX field ending the environment. It is important to use encapsulated TeX fields to avoid having the body of the environment appear in the SW edit window inside a single TeX field. The environments must have matching begin and end macros to prevent a LaTeX error.

To typeset a portion of a document in single space:

  1. Position the cursor at the beginning of the text you want to single space.

  2. Choose Insert, Field, TeX, and turn on the Encapsulate check box.

  3. In the Name field enter a convenient name like Start Single Space.

  4. In the body of the dialog enter \begin{singlespace}.

  5. Move the cursor to the end of the text you want to single space.

  6. Select Insert, Field, TeX, and turn on the Encapsulate check box.

  7. In the Name field enter End Single Space, and in the body of the dialog enter \end{singlespace}. You can use any of the three predefined environments in this way.

Selecting arbitrary line spacing

The doublespace package defines the macro \setstretch that can be used to set arbitrary line spacing when your document is typeset. The change in spacing does not occur until a font change command is used. For example, to select 1.2 line spacing:

  1. Move the cursor to the beginning of the text that will have the new line spacing.

  2. Choose Insert, Field, TeX, and turn on the Encapsulate check box.

  3. In the Name field, enter a convenient name like 1.2 Line Spacing.

  4. In the body of the dialog enter \setstretch{1.2}\small\normalsize.

    Remember to turn on the Encapsulate check box to avoid having the normalsize font switch saved throughout the remainder of your document. The line spacing will be set at the new value you select until another \setstretch macro is inserted in your document.

Sample document

Download the sample document ChangingLineSpacing.tex to see examples of the above techniques.

Added 04/28/96; revised 09/11/02

This document was created with Scientific WorkPlace.