Rtf syntax



Download 154.15 Kb.
Page6/6
Date conversion29.04.2016
Size154.15 Kb.
1   2   3   4   5   6

Absolute-Positioned Objects

These paragraph formatting control words specify the location of the paragraph on the

page.


Control word

Meaning

\posxn

Positions paragraph n twips from left edge of reference frame

\posxc

Centers paragraph horizontally within reference frame

\posxi

Positions paragraph horizontally inside reference frame

\posxl

Positions paragraph to left within reference frame

\posxo

Positions paragraph horizontally outside reference frame

\posxr

Positions paragraph to right within reference frame

\posyn

Positions paragraph n twips from top edge of reference frame

\posyil

Positions paragraph vertically to be in-line

\posyt

Positions paragraph at top of reference frame

\posyc

Centers paragraph vertically within reference frame

\posyb

Positions paragraph at bottom of reference frame

\abswn

Absolute width of paragraph text in twips

\dxfrtextn

Horizontal distance in twips of an absolutely postioned paragraph from text in main text flow

\pvmrg

Position vertically relative to margin

\pvpg

Position vertically relative to page

\phmrg

Position horizontally relative to margin

\phpg

Position horizontally relative to page

\phcol

Position horizontally relative to column

The following is an example of absolute-positioned text in a document


É

\par \pard \pvpg\phpg\posxc\posyt\absw5040\dxfrtextl73 abs pos paral

\par \pard \phmrg\posxo\posyc \dxfrtext1 152 abs pos para2
É
A Text to be positioned

Tables

A table is a collection of paragraphs. A table row is a continuous sequence of paragraphs partitioned into cells. The last paragraph of a cell is terminated by a cell mark (the \cell control word), and the row is terminated by a row mark (the \row control word) There is no RTF table group; the \intbl paragraph formatting control word identifies the paragraph as part of a table.





Control word

Meaning

\clbrdrb

Bottom table cell border

\clbrdrt

Top table cell border

\clbrdrl

Left table cell border

\clbrdrr

Right table cell border

\trowd

Sets table row defaults

\trql

Left justifies table row with respect to its table column

\trqr

Right justifies table row with respect to its containing column

\trqc

Centers table row with respect to its containing column

\trgaphn

Half the space between cells of a table row in twips

\trrhn

Height of a table row in twips; when 0, height is sufficient for all text in line; when positive, height is guaranteed to be at least the specified height; when negative, the absolute value of the height is used, regardless of the height of the text in the line

\trleftn

Position of Ieftmost edge of table with respect to the left edge of its column

\cellxn

Moves the right boundary of a table cell, including its half of the space between cells

\clmgf

The first cell in a range of table cells to be merged

\clmrg

Contents of table cell are merged with preceding cell

The following example shows some table text


É

\par\trowd\trqc\trgaph108\trrh280\trleft36

\clbrdrt\brdrth\clbrdrn\brdrth\clbrdrb\brdrdb

\clbrdr\brdrdb\celbx3636\clbrdrt\brdrth

\clbrdrl\brdrdb \clbrdrb\brdrdb \dbrdrr\brdrdb

\cellx7236\clbrdrt\brdrth\dbrdrl\brdrdb

\clbrdrb\brdrdb\clbrdr\brdrdb\cellx10836\pard \intbl

\cell \pard \intbl \cell \pard \intbl \cell \pard \intbl \row

\trowd \trqc\trgaph108\trrh280\trleft36 \dbrdrt\brdrdb

\clbrdrl\brdrth \clbrdrb \brdrsh\brdrs \dbrdrr\brdrdb

\cellx3636\clbrdr\brdrdb \dbrdr\brdrdb

\clbrdrb\brdrsh\brdrs \dbrdrr\brdrdb

\cellx7236\clbrdrt \brdrdb \dbrdr \brdrdb

\clbrdrb\brdrsh\brdrs \clbrdrr\brdrdb \celbx10836\pard

\intbl \cell \pard \intbl \cell \pard \intbl \cell \pard

\intbl \row \pard

É


Character Formatting Properties

The last group controls character formatting properties. A control word preceding plain text turns on the specified attribute. Some control words (indicated by an asterisk following the description) can be turned off by the control word followed by a zero (0). For example, \b turns bold on, while \b0 turns bold off.




Control word

Meaning

\plain

Resets application's default character formatting properties

\b

Bold*

\i

Italic*

\strike

Strikethrough*

\outl

Outline*

\shad

Shadow*

\scaps

Small capitals*

\caps

All capitals*

\v

Hidden text*

\fn

Font number

\fsn

Font size in half-points (default is 24)

\expndn

Expansion or compression of leading between characters in quarter-points; a negative value compresses (0)

\ul

Continuous underline*

\ulw

Word underline*

\uld

Dotted underline*

\uldb

Double underline*

\ulnone

Stops all underlining

\upn

Superscript position in half-points (default is 6)

\dnn

Subscript position in half-points (default is 6)

\revised

Text has been added since revision marking was turned on



Special Characters

Special RTF characters are listed below. If a character is not recognized by the RTF reader, it is ignored and the text following it is considered plain text. The RTF specification is flexible enough to allow new characters to be added for interchange with other software.




Control word

Meaning

\chdate

Current date (as in headers)

\chtime

Current time (as in headers)

\chpgn

Current page number (as in headers)

\chftn

Automatic footnole reference (footnotes follow in a group)

\chatn

Annotion reference (annotation text follows in a group)

\chftnsep

Anchoring character for footnote separator




Control word

Meaning

\chftnsepc

Anchoring character for footnote continuation

\|

Formula character

\~

Nonbreaking space

\-

Optional hyphen

\_

Nonbreaking hyphen

\'hh

A hexadecimal value, based on the specified character set (may be used to identify 8-bit values)

\cell

End of table cell

\row

End of table row

\par

End of paragraph

\sect

End of section and paragraph

\page

Required page break

\column

Required column break

\line

Required line break (no paragraph break)

\tab

Tab character, same as ASCII 9

\

Specifies a subentry in an index entry

\*

Marks a destination whose text should be ignored if not understood by the RTF reader


An ASCII 9 will be accepted as a tab character. The code \ (line feed) or \ (carriage return) is treated as the control word \par. You must include the backslashes or RTF will ignore the control word. You may also want to insert a carriage-return-line-feed pair (without backslashes) at least every 255 characters for better text transmission over communication lines.
1   2   3   4   5   6


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

    Main page