Rich-Text Format Specification V. 2 Introduction 2 rtf syntax 2 Conventions of an rtf reader 4



Download 1.09 Mb.
Page5/15
Date conversion29.04.2016
Size1.09 Mb.
1   2   3   4   5   6   7   8   9   ...   15

Section Text


Each section in the RTF file has the following syntax:



* ?
+ ( \ sect
)?



Section-Formatting Properties


At the beginning of each section, there may be some section formatting control words (described as in the syntax description). These control words specify section-formatting properties, which apply to the text following the control word, with the exception of the section-break control words (those beginning with \ sbk). Section-break control words describe the break preceding the text. These control words can appear anywhere in the section, not just at the start.

Note that if the \sectd control word is not present, the current section inherits all section properties defined in the previous section.



The section-formatting control words are listed in the following table:

Control word

Meaning

\ sectd

Reset to default section properties.

\ endnhere

Endnotes included in the section.

\ binfsxnN

N is the printer bin used for the first page of the section. If this control is not defined then the first page uses the same printer bin as defined by the \ binsxnN control.

\ binsxnN

N is the printer bin used for the pages of the section.

\ dsN

Designates section style; if a section style is specified, style properties must be specified with the section.

\ sectunlocked

This section is unlocked for forms.

Section break




\ sbknone

No section break.

\ sbkcol

Section break starts a new column.

\ sbkpage

Section break starts a new page (default).

\ sbkeven

Section break starts at an even page.

\ sbkodd

Section break starts at an odd page.

Columns




\ colsN

Number of columns for "snaking" (default is 1).

\ colsxN

Space between columns in twips (default is 720).

\ colnoN

Column number to be formatted; used to specify formatting for variable-width columns.

\ colsrN

Space to right of column in twips; used to specify formatting for variable-width columns.

\ colwN

Width of column in twips; used to override the default constant width setting for variable-width columns.

\ linebetcol

Line between columns.

Line numbering




\ linemodN

Line-number modulus amount to increase each line number (default is 1).

\ linexN

Distance from the line number to the left text margin in twips (default is 360). The automatic distance is 0.

\ linestartsN

Beginning line number (default is 1).

\ linerestart

Line numbers restart at \ linestarts value.

\ lineppage

Line numbers restart on each page.

\ linecont

Line numbers continue from the preceding section.

Page information




\ pgwsxnN

N is the page width in twips. A \ sectd resets the value to that specified by \ paperwN in the document properties.

\ pghsxnN

N is the page height in twips. A \ sectd resets the value to that specified by \ paperhN in the document properties.

\ marglsxnN

N is the left margin of the page in twips. A \ sectd resets the value to that specified by \ marglN in the document properties.

\ margrsxnN

N is the right margin of the page in twips. A \ sectd resets the value to that specified by \ margrN in the document properties.

\ margtsxnN

N is the right margin of the page in twips. A \ sectd resets the value to that specified by \ margrN in the document properties.

\ margbsxnN

N is the top margin of the page in twips. A \ sectd resets the value to that specified by \ margtN in the document properties.

\ guttersxnN

N is the width of the gutter margin for the section in twips. A \ sectd resets the value to that specified by \ gutterN from the document properties. If Facing Pages is turned off, the gutter will be added to the left margin of all pages. If Facing Pages is turned on, the gutter will be added to the left side of odd-numbered pages and the right side of even-numbered pages.

\ lndscpsxn

Page orientation is in landscape format. In order to mix portrait and landscape sections within a document, the \ landscape control should not be used so that the default for a section is portrait which may be overridden by the \ lndscpsxn control.

\ titlepg

First page has a special format.

\ headeryN

Header is n twips from the top of the page (default is 720).

\ footeryN

Footer is n twips from the bottom of the page (default is 720).

Page numbers




\ pgnstartsN

Beginning page number (default is 1).

\ pgncont

Continuous page numbering (default).

\ pgnrestart

Page numbers restart at \ pgnstarts value.

\ pgnxN

Page-number is n twips from the right margin (default is 720).

\ pgnyN

Page-number is n twips from the top margin (default is 720).

\ pgndec

Page-number format is decimal.

\ pgnucrm

Page-number format is uppercase roman numeral.

\ pgnlcrm

Page-number format is lowercase roman numeral.

\ pgnucltr

Page-number format is uppercase letter.

\ pgnlcltr

Page-number format is lowercase letter.

\ pgnhnN

Indicates which heading level to prepend to the page number. 0 specifies to not show heading level (default). Values 1-9 correspond to heading levels 1 through 9. This is a destination control word.

\ pgnhnsh

Hyphen separator character.

\ pgnhnsp

Period separator character.

\ pgnhnsc

Colon separator character.

\ pgnhnsm

Em-dash separator character.

\ pgnhnsn

En-dash separator character.

\ pnseclvlN

Used for multilevel lists. This property sets the default numbering style for each corresponding \ pnlvlN (bullets and numbering property for paragraphs) within that section. This is a destination control word.

Vertical alignment




\ vertalt

Text is top-aligned (default).

\ vertalb

Text is bottom-aligned.

\ vertalc

Text is centered vertically.

\ vertalj

Text is justified vertically.

Bidirectional controls




\ rtlsect

This section will thread columns from right to left.

\ ltrsect

This section will thread columns from left to right. This is the default.



Headers and Footers


Headers and footers are RTF destinations. Each section in the document may have its own set of headers and footers. If no headers or footers are defined for a given section, the headers and footers from the previous section (if any) are used. The syntax for headers and footers are as follows:



'{'
+ '}' ?



\ header | \ footer | \ headerl | \ headerr | \ headerf | \ footerl | \ footerr | \ footerf

Note that each separate group must have a distinct introducing it.



Control word

Meaning

\ header

Header on all pages. This is a destination control word.

\ footer

Footer on all pages. This is a destination control word.

\ headerl

Header on left pages only. This is a destination control word.

\ headerr

Header on right pages only. This is a destination control word.

\ headerf

Header on first page only. This is a destination control word.

\ footerl

Footer on left pages only. This is a destination control word.

\ footerr

Footer on right pages only. This is a destination control word.

\ footerf

Footer on first page only. This is a destination control word.

The \ headerl, \ headerr, \ footerl and \ footerr control words are used in conjunction with the \ facingp control word, and the \ headerf and \ footerf control words are used in conjunction with the \ titlepg control word. Many RTF readers will not function correctly if the appropriate document properties are not set. In particular, if \facingp is not set, then only \header and \footer should be used; if \facingp is set, then only \headerl, \headerr, \footerl, and \footerr should be used. You should not use \header to set the headers for both pages when \facingp is set. You can use \headerf if \titlepg is not set, but no header will appear. For more information, see "Document-Formatting Properties" and "Section-Formatting Properties".

If the previous section had a first page header or footer and had \ titlepg set, and the current section does not, then the previous section's first page header or footer is disabled. It is not, however destroyed; if subsequent sections have \ titlepg set, then the first page header or footer will be restored.

1   2   3   4   5   6   7   8   9   ...   15


The database is protected by copyright ©essaydocs.org 2016
send message

    Main page