• Aucun résultat trouvé

DEFINING SPECIAL CHARACTERS THAT AFFECT SCRIPT/VS PROCESSING

Dans le document Program Product (Page 110-113)

You can define characters with special meaning to SCRIPT/VS using the .DC [Define Character] control word. The special characters are:

The array element separators,

which are placed between ele-ments of a symbol array. See "Chapter 12. Symbols in Your Doc-ument" on page 129 for details.

The continuation character,

which allows single words to span input lines. The continuation character is described below.

The control word separator,

which allows several SCRIPT/VS control words to be "stacked" on a single input line. See

"Chapter 3. Basic Text Processing" on page 33 for details.

The

GML

delimiter and markup content separator,

which are used to delimit GML tags and attributes. See "Chapter 14. GML Support in SCRIPT/VS" on page 159 for details.

Indexing characters,

which are to be ignored or treated as blanks when preparing index entries. See "Chapter 7.

Indexing" on page 79 for details.

The page number symbol,

which is replaced with the current page number wherever i t appears in, running titles, running

Chapter 8. Additional Formatting Features of SCRIPT/VS 91

headings, and running footings. See RChapter 4. Defining a Page Layout R on page 55 for details.

Punctuation characters, which are recognized during spelling veri fication. See "Chapter 16. Automatic Hyphenation and Spelling Verification" on page 171 for details.

The required blank, which is not recognized as an interword space during justification, but is translated to an ordinary blank on output.

Full stop characters, which indicate the end of a sentence.

See "Chapter 3. Basic Text Processing" on page 33 for details.

Word delimiters, which delimit words for purposes of spelling veri fication. See "Chapter 16. Automatic Hyphenation and Spelling Verification R on page 171 for details.

The parameters of the .DC control word are described in detail in R.DC [Define Character]R on page 241.

The Continuation Character

SCRIPT/VS ordinarily appends an interword space to the last word on a text input line. However, if the last character on a text input line is the continuation character, it is removed and the interword space is not appended. The continuation character is defined with the .DC [Define Character] control word:

.dc cont +

This allows a single word to span text input lines and control words. For example, the input lines

A few high+

.bf GB12 light+

.pf

ed characters.

will produce this output:

A few highlighted characters.

If the formatter control or text which follows the continued word causes a break, continuation is cancelled for that line. The con-trol ~ords that cause breaks are listed in Figure 25 on page 354.

There is no default continuation character; it must be explicitly set before it can be used.

ENSURING THAT BLOCKS OF TEXT STAY TOGETHER

SCRIPT/VS provides several means of keeping lines of text togeth-er for such purposes as:

• Ensuring that an example or list of items is not spli t across a column or page

• Keeping a heading and the first few lines of text below it together

• Preventing widows (single lines at the beginning or end of a paragraph that appear by themselves at the bottom or top of a column or page)

• Placing a figure or diagram at the top or bottom of a column or page

When you wish to keep a specific group of lines, such as a figure or example, together, consider using:

• Regular keeps, started with .KP ON, place the kept text in the current column if it will fit. Otherwise, a column eject is performed and the text is placed in the next column.

• Floating keeps, started with .KP FLOAT, save the kept text for the next column if it does not fit in the current column, for-mats the text that follows the keep in the input file, and places it in the current column.

• Delayed keeps, started with .KP DELAY, are always placed in the next col umn, whether or not they fi t i n the current column. As with floating keeps, text following the keep in the input file may be moved ahead of it in the output to fill the current column.

Each of these keeps must be explicitly ended with .KP OFF, and each saves the current formatting environment, including any par-tially processed output line. The formatting environment is restored when the keep ends. See Figure 34 on page 360 for a list of the formatting parameters saved and restored around keeps.

For example, .kp on .fo center

These lines will be kept together in the

column, regardless of page ejects and column balancing, and

the formatted lines will be centered . . kp off

These lines will not, however, necessarily appear in the same column

as the lines above, nor will they be centered, since the formatting mode was restored when the keep was ended.

will be formatted as

These lines will be kept together in the column, regardless of page ejects and column balancing, and the

formatted lines will be centered.

These lines will not, however, necessarily appear in the same column as the lines above, nor will they be centered, since the formatting mode was restored when the keep was ended.

If you place a large figure in a regular keep, and it does not fit in the current column, it will be placed in the next column. This may leave a large blank space at the bottom of the current column.

If the figure does not have a specific relationship to the text around it, you can avoid the blank space by placing the figure in a floating keep. For example,

This paragraph contains a reference to the figure that follows it.

This text will appear above the figure, .br .kp float

(drop in figure here) .kp off

but this text may appear above or

below the figure, depending upon whether the figure is moved to the next column.

There is an order of precedence among keeps, with regular, float-ing, and delayed keeps taking precedence over inline keeps. If an inline keep is encountered within a floating keep, it is ignored.

Chapter 8. Additional Formatting Features of SCRIPT/VS 93

Dans le document Program Product (Page 110-113)