There are two kinds of paragraphs: plain and table. A table is a collection of paragraphs, and a table row is a continuous sequence of paragraphs partitioned into cells. The \intbl paragraph-formatting control word identifies the paragraph as part of a table. For more information, see "Table Definitions" on page 40 of this Application Note. This control is inherited between paragraphs that do not have paragraph properties reset with \pard.
<para> | <textpar> | <row> |
<textpar> | <pn>? <brdrdef>? <parfmt>* <apoctl>* <tabdef>? <shading>? (\subdocument | <char>+) (\par <para>)? |
<row> | <tbldef> <cell>+ \row |
<cell> | <textpar>+ \cell |
These control words (described as <parfmt> in the paragraph-text syntax description) specify generic paragraph formatting properties. These control words can appear anywhere in the body of the paragraph, not just at the beginning.
Note that if the \pard control word is not present, the current paragraph inherits all paragraph properties defined in the previous paragraph.
The paragraph-formatting control words are listed in the following table.
Control word | Meaning | |
\par | New paragraph. | |
\ pard | Resets to default paragraph properties. | |
\sN | Designates paragraph style. If a paragraph style is specified, style properties must be specified with the paragraph. N references an entry in the stylesheet. | |
\hyphpar | Toggles automatic hyphenation for the paragraph. Append 1 or nothing to toggle property on; append 0 to turn it off. | |
\intbl | Paragraph is part of a table. | |
\keep | Keep paragraph intact. | |
\nowidctlpar | No widow/orphan control. This is a paragraph-level property and is used to override the document-level \widowctrl. | |
\widctlpar | Widow/orphan control is used for the current paragraph. This is a paragraph property used to override the absence of the document-level \widowctrl | |
\keepn | Keep paragraph with the next paragraph. | |
\levelN | N is the outline level of the paragraph. | |
\noline | No line numbering. | |
\outlinelevelN | Outline level of paragraph. The N argument is a value from 0-8 representing the outline level of the paragraph. In the default case, no outline level is specified (same as body text). | |
\pagebb | Break page before the paragraph. | |
\sbys | Side-by-side paragraphs. | |
Alignment | ||
\ql | Left-aligned (the default). | |
\qr | Right-aligned. | |
\qj | Justified. | |
\qc | Centered. | |
Indentation | ||
\fiN | First-line indent (the default is 0). | |
\liN | Left indent (the default is 0). | |
\riN | Right indent (the default is 0). | |
Spacing | ||
\sbN | Space before (the default is 0). | |
\saN | Space after (the default is 0). | |
\slN | Space between lines. If this control word is missing or if \sl0 is used, the line spacing is automatically determined by the tallest character in the line; if N is a positive value, this size is used only if it is taller than the tallest character (otherwise, the tallest character is used); if N is a negative value, the absolute value of N is used, even if it is shorter than the tallest character. | |
\slmultN | Line spacing multiple. Indicates that the current line spacing is a multiple of "Single" line spacing. This control word can follow only the \sl control word and works in conjunction with it. 0"At Least" or "Exactly" line spacing. 1Multiple line spacing, relative to "Single." |
|
Subdocuments | ||
\subdocumentN | This indicates that a subdocument in a master document/subdocument relationship should occur here. N represents an index into the file table. This control word must be the only item in a paragraph. | |
Bidirectional Controls | ||
\rtlpar | Text in this paragraph will be displayed with right-to-left precedence. | |
\ltrpar | Text in this paragraph will be displayed with left-to-right precedence (the default). |
Any paragraph may have its own set of tabs. Tabs must follow this syntax:
<tabdef> | (<tab> | <bartab>) + |
<tab> | <tabkind>? <tablead>? \tx |
<bartab> | <tablead>? \tb |
<tabkind> | \tqr | \tqc | \tqdec |
<tablead> | \tldot | \tlhyph | \tlul | \tlth | \tleq |
Control word | Meaning |
\txN | Tab position in twips from the left margin. |
\tqr | Flush-right tab. |
\tqc | Centered tab. |
\tqdec | Decimal tab. |
\tbN | Bar tab position in twips from the left margin. |
\tldot | Leader dots. |
\tlhyph | Leader hyphens. |
\tlul | Leader underline. |
\tlth | Leader thick line. |
\tleq | Leader equal sign. |
To provide compatibility with existing RTF readers, all applications that can automatically format paragraphs with bullets or numbers will also emit the generated text as plain text in the \pntext group. This will allow existing RTF readers to capture the plain text and safely ignore the autonumber instructions. This group precedes all bulleted or numbered paragraphs, and will contain all the text and formatting that would be auto-generated. It should precede the '{'\*\pn ... '}' destination, and it is the responsibility of RTF readers that understand the '{'\*\pn ... '}' destination to ignore the \pntext group.
<pn> | <pnseclvl> | <pnpara> |
<pnseclvl> | '{\*' \pnseclvl <pndesc>'}' |
<pnpara> | <pntext> <pnprops> |
<pntext> | '{' \pntext <char> '}' |
<pnprops> | '{\*' \pn <pnlevel> <pndesc>'}' |
<pnlevel> | \pnlvl | \pnlvlblt | \pnlvlbody | \pnlvlcont |
<pndesc> | <pnnstyle> & <pnchrfmt> & <pntxtb> & <pntxta> & <pnfmt> |
<pnnstyle> | \pncard | \pndec | \pnucltr | \pnucrm | \pnlcltr | \pnlcrm | \pnord | \pnordt |
<pnchrfmt> | \pnf? & \pnfs? & \pnb? & \pni? & \pncaps? & \pnscaps? & <pnul>? & \pnstrike? & \pncf? |
<pnul> | \pnul | \pnuld | \pnuldb | \pnulnone | \pnulw |
<pnfmt> | \pnnumonce? & \pnacross? & \pnindent? & \pnsp? & \pnprev? & <pnjust>? & \pnstart? & \pnhang? & \pnrestart? |
<pnjust> | \pnqc | \pnql | \pnqr |
<pntxtb> | '{' \pntxtb #PCDATA'}' |
<pntxta> | '{' \pntxta #PCDATA'}' |
Settings below marked with an asterisk can be turned off by appending 0 to the control word.
Control word | Definition |
\pntext | This group precedes all numbered/bulleted paragraphs, and contains all auto-generated text and formatting. It should precede the '{\*'\pn ... '}' destination, and it is the responsibility of RTF readers that understand the '{\*'\pn ... '}' destination to ignore this preceding group. This is a destination control word. |
\pn | Turns on paragraph numbering. This is a destination control word. |
\pnlvlN | Paragraph level, where N is a level from 1 to 9. Default set by \pnseclvlN section formatting property. |
\pnlvlblt | Bulleted paragraph (corresponds to level 11). The actual character used for the bullet is stored in the \pntxtb group. |
\pnlvlbody | Simple paragraph numbering (corresponds to level 10). |
\pnlvlcont | Continue numbering but do not display number (“skip numbering”). |
\pnnumonce | Number each cell only once in a table (the default is to number each paragraph in a table). |
\pnacross | Number across rows (the default is to number down columns). |
\pnhang | Paragraph uses a hanging indent. |
\pnrestart | Restart numbering after each section break. Note that this control word is used only in conjunction with the Heading Numbering feature (applying multilevel numbering to Heading style definitions). |
\pncard | Cardinal numbering (One, Two, Three). |
\pndec | Decimal numbering (1, 2, 3). |
\pnucltr | Uppercase alphabetic numbering (A, B, C). |
\pnucrm | Uppercase roman numbering (I, II, III). |
\pnlcltr | Lowercase alphabetic numbering (a, b, c). |
\pnlcrm | Lowercase roman numbering. (i, ii, iii). |
\pnord | Ordinal numbering (1st, 2nd, 3rd). |
\pnordt | Ordinal text numbering (First, Second, Third). |
\pnb | Bold numbering.* |
\pni | Italic numbering.* |
\pncaps | All Caps numbering.* |
\pnscaps | Small Caps numbering.* |
\pnul | Continuous underline.* |
\pnuld | Dotted underline. |
\pnuldb | Double underline. |
\pnulnone | Turns off underlining. |
\pnulw | Word underline. |
\pnstrike | Strikethrough numbering.* |
\pncfN | Foreground color—index into color table (the default is 0). |
\pnfN | Font number. |
\pnfsN | Font size (in half-points). |
\pnindentN | Minimum distance from margin to body text. |
\pnspN | Distance from number text to body text. |
\pnprev | Used for multilevel lists. Include information from previous level in this level; for example, 1, 1.1, 1.1.1, 1.1.1.1 |
\pnqc | Centered numbering. |
\pnql | Left-justified numbering. |
\pnqr | Right-justified numbering. |
\pnstartN | Start at number. |
\pntxta | Text after. This group contains the text that succeeds the number. This is a destination control word. |
\pntxtb | Text before. This group contains the text that precedes the number. This is a destination control word. |
Note that there is a limit of 32 characters total for the sum of text before and text after for simple numbering. Multilevel numbering has a limit of 64 characters total for the sum of all levels.
Each paragraph that is part of a list must contain some keyword to indicate which list it’s in, and which level of the list it belongs to. Word 97 also provides the flat text representation of each number (in the \listtext destination); so, RTF readers that don’t understand Word 97 numbering will get the paragraph number, along with appropriate character properties, inserted into their document at the beginning of the paragraph. Any RTF reader that does understand Word 97 numbering should ignore the entire \listtext destination.
Control word | Meaning |
\ls | Should exactly match the ls for one of the list overrides in the List Override table. |
\ilvl | The 0-based level of the list to which the paragraph belongs. For all simple lists, this should always be 0 . For multilevel lists, it can be 0-8. |
\listtext | Contains the flat text representation of the number, including character properties. Should be ignored by any reader that understands Word 97 numbering. This is a destination control word. |
Paragraph numbers and ListNum fields track revision information with special properties applied to the paragraph mark and ListNum field, respectively. The special properties hold the "old" value of the number—the value it held when revision-mark tracking began. At display time, Word checks the number's current value and compares it with this "old" value to tell if it has changed. If the numbers are different, the old value shows up as deleted and the new value as inserted; if the numbers are the same, Word displays the new value normally, with no revision information. If there was no old value, the new value shows up as inserted. The following table lists the RTF specifications for these special properties.
Track Changes (Revision mark) properties for paragraph numbers | |
\pnrauthN | Index into the revision table. The content of the Nth group in the revision table is considered to be the author of that revision. Note This keyword is used to indicate paragraph number revisions. |
\pnrdateN | Time of the revision. The 32-bit DTTM structure is emitted as a long integer. |
\pnrnot | Indicates if the paragraph number for the current paragraph is marked as "inserted." |
\pnrxstN | The keywords \pnrxst, \pnrrgb, \pnrpnbr, and \pnrnfc describe the "deleted number" text for the paragraph number. Their values are binary. Each of these keywords is represented as an array. The deleted number is written out with a \pnrstart keyword, followed by the array’s keyword, followed by the first byte of the array, followed by the array’s keyword, followed by the second byte of the array’s keyword, followed by the array’s keyword, followed by the third byte of the array’s keyword, and so on. This sequence is followed by the \pnrstop keyword. \pnrxst is a 32-item Unicode character array (double bytes for each character) with a length byte as the first number—it has the actual text of the number, with "level" place holders written out as digits from 0-8. |
\pnrrgbN | Nine-item array of indices of the level place holders in the \pnrxst array. |
\pnrnfcN | Nine-item array containing the number format codes of each level (using the same values as the \levelnfc keyword). The number format code is represented as a short integer. |
\pnrpnbrN | Nine-item array of the actual values of the number in each level. The number is represented as a long integer |
\pnrstartN | The \pnrxst, \pnrrgb, \pnrpnbr, and \pnrnfc arrays are each preceded by the \pnrstart keyword, whose argument is 0-3 depending on the array. |
\pnrstopN | The \pnrxst, \pnrrgb, \pnrpnbr, and \pnrnfc arrays are each terminated by the \pnrstop keyword, whose argument is the number of bytes written out in the array. |
Example:
Let’s take an example of the number "3-4b." which represents the third level of the list. The following table lists the values of each array.
Array | Binary | Comment |
pnrxst | \'05\'00-\'01\'02 | The length of the string is 5. Then, first level (level 0), followed by a dash, followed by the second and third levels (levels 1 and 2), followed by a period. |
Pnrrgb | \'01\'03\'04 | The level place holders are at indices 1, 3, and 4 in the string. |
Pnrnfc | \'00\'00\'04 | The nfc values are Arabic (0), Arabic (0), and lowercase letter (4). |
Pnrpnbr | \'03\'04\'02 | The numbers or 3, 4, and 2 (b) |
Here is the RTF for this number:
\pnrstart0
\pnrxst0\pnrxst5\pnrxst0\pnrxst1\pnrxst0\pnrxst45\pnrxst0\pnrxst2\pnrxst0\pnrxst3\pnrxst0\pnrxst46
\pnrstop12
\pnrstart1
\pnrrgb1\pnrrgb3\pnrrgb4
\pnrrgb0\pnrrgb0\pnrrgb0
\pnrrgb0\pnrrgb0\pnrrgb0
\pnrstop9
\pnrstart2
\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc4
\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0
\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0
\pnrstop18
\pnrstart3
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr3
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr4
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr2
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0
\pnrstop36
Control word | Meaning |
Track Changes (Revision mark) properties for ListNum fields | |
\dfrauthN | Index into the revision table. The content of the Nth group in the revision table is considered the author of that revision. Note This keyword is used to indicate the deleted value of a ListNum field. |
\dfrdateN | Time of the revision. The 32-bit DTTM structure is emitted as a long integer. |
\dfrxst | Unicode character array with a length byte. |
\dfrstart | The \dfrxst array is preceded by the \dfrstart keyword. |
\dfrstop | The \dfrxst array is terminated by the \dfrstop keyword. |
Example:
Let’s take the sample example from above. The deleted value is "3-4b." The RTF would then be
\dfrstart0\dfrxst0\dfrxst5\dfrxst0\dfrxst51\dfrxst0\dfrxst45\dfrxst0\dfrxst52
\dfrxst0\dfrxst66\dfrxst0\dfrxst46\dfrstop10
where 5 is the length byte, 51 is Unicode for "3", 45 is Unicode for "-", 52 is Unicode for "4", and so on.
Paragraph borders have the following syntax:
<brdrdef> | (<brdrseg> <brdr> )+ |
<brdrseg> | \brdrt | \brdrb | \brdrl | \brdrr | \brdrbtw | \brdrbar | \box |
<brdr> | <brdrk> \brdrw? \brsp? \brdrcf? |
<brdrk> | \brdrs | \brdrth | \brdrsh | \brdrdb | \brdrdot | \brdrdash | \brdrhair |
Control word | Meaning | |
\brdrt | Border top. | |
\brdrb | Border bottom. | |
\brdrl | Border left. | |
\brdrr | Border right. | |
\brdrbtw | Consecutive paragraphs with identical border formatting are considered part of a single group with the border information applying to the entire group. To have borders around individual paragraphs within the group, the \brdrbtw control must be specified for that paragraph. | |
\brdrbar | Border outside (right side of odd-numbered pages, left side of even-numbered pages). | |
\box | Border around the paragraph (box paragraph). | |
\brdrs | Single-thickness border. | |
\brdrth | Double-thickness border. | |
\brdrsh | Shadowed border. | |
\brdrdb | Double border. | |
\brdrdot | Dotted border. | |
\brdrdash | Dashed border. | |
\brdrhair | Hairline border. | |
\brdrdashsm | Dash border (small). | |
\brdrdashd | Dot dash border. | |
\brdrdashdd | Dot dot dash border. | |
\brdrtriple | Triple border. | |
\brdrtnthsg | Thick thin border (small). | |
\brdrthtnsg | Thin thick border (small). | |
\brdrtnthtnsg | Thin thick thin border (small). | |
\brdrtnthmg | Thick thin border (medium). | |
\brdrthtnmg | Thin thick border (medium). | |
\brdrtnthtnmg | Thin thick thin border (medium). | |
\brdrtnthlg | Thick thin border (large). | |
\brdrthtnlg | Thin thick border (large). | |
\brdrtnthtnlg | Thin thick thin border (large). | |
\brdrwavy | Wavy border. | |
\brdrwavydb | Double wavy border. | |
\brdrdashdotstr | Striped border. | |
\brdremboss | Emboss border. | |
\brdrengrave | Engrave border. | |
\brdrwN | N is the width in twips of the pen used to draw the paragraph border line. N cannot be greater than 75. To obtain a larger border width, the \brdth control word can be used to obtain a width double that of N. | |
\brdrcfN | N is the color of the paragraph border, specified as an index into the color table in the RTF header. | |
\brspN | Space in twips between borders and the paragraph. |
Paragraph shading has the following syntax:
<shading> | (\shading | <pat>) \cfpat? \cbpat? |
<pat> | \bghoriz | \bgvert | \bgfdiag | \bgbdiag | \bgcross | \bgdcross | \bgdkhoriz | \bgdkvert | \bgdkfdiag | \bgdkbdiag | \bgdkcross | \bgdkdcross |
Control word | Meaning |
\shadingN | N is the shading of the paragraph in hundredths of a percent. |
\bghoriz | Specifies a horizontal background pattern for the paragraph. |
\bgvert | Specifies a vertical background pattern for the paragraph. |
\bgfdiag | Specifies a forward diagonal background pattern for the paragraph (\\\\). |
\bgbdiag | Specifies a backward diagonal background pattern for the paragraph (////). |
\bgcross | Specifies a cross background pattern for the paragraph. |
\bgdcross | Specifies a diagonal cross background pattern for the paragraph. |
\bgdkhoriz | Specifies a dark horizontal background pattern for the paragraph. |
\bgdkvert | Specifies a dark vertical background pattern for the paragraph. |
\bgdkfdiag | Specifies a dark forward diagonal background pattern for the paragraph (\\\\). |
\bgdkbdiag | Specifies a dark backward diagonal background pattern for the paragraph (////). |
\bgdkcross | Specifies a dark cross background pattern for the paragraph. |
\bgdkdcross | Specifies a dark diagonal cross background pattern for the paragraph. |
\cfpatN | N is the fill color, specified as an index into the document's color table. |
\cbpatN | N is the background color of the background pattern, specified as an index into the document's color table. |
The following paragraph-formatting control words specify the location of a paragraph on the page. Consecutive paragraphs with the same frame formatting are considered part of the same frame. For two framed paragraphs to appear at the same position on a page, they must be separated by a paragraph with different or no frame information.
Note that if any paragraph in a table row has any of these control words specified, then all paragraphs in the table row must have the same control words specified, either by inheriting the properties from the previous paragraph or by re-specifying the controls.
Paragraph positioning has the following syntax:
<apoctl> | <framesize> & <horzpos> & <vertpos> & <txtwrap> & <dropcap> |
<framesize> | \absw? & \absh? |
<horzpos> | <hframe> & <hdist> |
<vertpos> | <vframe> & <vdist> |
<txtwrap> | \nowrap? & \dxfrtext? & \dfrmtxtx? &\dfrmtxty? |
<dropcap> | \dropcapli? & \dropcapt? |
<hframe> | \phmrg? | \phpg? | \phcol? |
<hdist> | \posx? | \posnegx? | \posxc? | \posxi? | \posxo? | \posxl? | \posxr? |
<vframe> | \pvmrg? | \pvpg? | \pvpara? |
<vdist> | \posy? | \posnegy? | \posyt? | \posyil? | \posyb? | \posyc? & \abslock |
Control word | Meaning |
\abswN | N is the width of the frame in twips. |
\abshN | N is the height of the frame in twips. A positive number indicates the minimum height of the frame and a negative number indicates the exact height of the frame. A value of zero indicates that the height of the frame adjusts to the contents of the frame. This is the default for frames where no height is given. |
Horizontal Position | |
\phmrg | Use the margin as the horizontal reference frame. |
\phpg | Use the page as the horizontal reference frame. |
\phcol | Use the column as the horizontal reference frame. This is the default if no horizontal reference frame is given. |
\posxN | Positions the frame N twips from the left edge of the reference frame. |
\posnegxN | Same as \posx but allows arbitrary negative values. |
\posxc | Centers the frame horizontally within the reference frame. |
\posxi | Positions the paragraph horizontally inside the reference frame. |
\posxo | Positions the paragraph horizontally outside the reference frame. |
\posxr | Positions the paragraph to the right within the reference frame. |
\posxl | Positions the paragraph to the left within the reference frame. This is the default if no horizontal positioning information is given. |
Vertical Position | |
\pvmrg | Positions the reference frame vertically relative to the margin. This is the default if no vertical frame positioning information is given. |
\pvpg | Positions the reference frame vertically relative to the page. |
\pvpara | Positions the reference frame vertically relative to the top of the top left corner of the next unframed paragraph in the RTF stream. |
\posyN | Positions the paragraph N twips from the top edge of the reference frame. |
\posnegyN | Same as \posy but allows arbitrary negative values. |
\posyil | Positions the paragraph vertically to be in-line. |
\posyt | Positions the paragraph at the top of the reference frame. |
\posyc | Centers the paragraph vertically within the reference frame. |
\posyb | Positions the paragraph at the bottom of the reference frame. |
\abslock | Locks a frame anchor to the current paragraph that it is associated with. |
Text Wrapping | |
\nowrap | Prevents text from flowing around the positioned object. |
\dxfrtextN | Distance in twips of a positioned paragraph from text in the main text flow in all directions. |
\dfrmtxtxN | N is the horizontal distance in twips from text on both sides of the frame. |
\dfrmtxtyN | N is the vertical distance in twips from text on both sides of the frame. |
\overlay | Text flows underneath frame. |
\posyin | Positions the paragraph vertically inside the reference frame. |
\posyout | Positions the paragraph vertically outside the reference frame. |
Drop Caps | |
\dropcapliN | Number of lines drop cap is to occupy. The range is 1 through 10. |
\dropcaptN | Type of drop cap: 1In-text drop cap 2Margin drop cap |
The following is an example of absolute-positioned text in a document:
\par \pard \pvpg\phpg\posxc\posyt\absw5040\dxfrtest173 First APO para
\par \pard \phmrg\posxo\posyc\dxfrtext1152 Second APO para
There is no RTF table group; instead, tables are specified as paragraph properties. A table is represented as a sequence of table rows. A table row is a continuous sequence of paragraphs partitioned into cells. The table row begins with the \trowd control word and ends with the \row control word. Every paragraph that is contained in a table row must have the \intbl control word specified or inherited from the previous paragraph. A cell may have more than one paragraph in it; the cell is terminated by a cell mark (the \cell control word), and the row is terminated by a row mark (the \row control word). Table rows can also be positioned. In this case, every paragraph in a table row must have the same positioning controls (see the <apoctl> controls on page 29 of this Application Note). Table properties may be inherited from the previous row; therefore, a series of table rows may be introduced by a single <tbldef>.
An RTF table row has the following syntax, as shown in the general paragraph-text syntax shown on page 23 of this Application Note.
<row> | <tbldef> <cell>+ \row |
<cell> | <textpar>+ \cell |
A table definition has the following syntax:
<tbldef> | \trowd \trgaph <rowjust>? & <rowwrite>? <rowtop>? & <rowbot>? & <rowleft>? & <rowright>? & <rowhor>? & <rowvert>? & \trleft? & \trrh? \trhdr? & \trkeep? <celldef>+ |
<rowjust> | \trql | \trqr | \trqc |
<rowwrite> | \ltrrow | \rtlrow |
<rowtop> | \trbrdrt <brdr> |
<rowbot> | \trbrdrl <brdr> |
<rowleft> | \trbrdrb <brdr> |
<rowright> | \trbrdrr <brdr> |
<rowhor> | \trbrdrh <brdr> |
<rowvert> | \trbrdrv <brdr> |
<celldef> | (\clmgf? & \clmrg? <celltop>? & <cellleft>? & <cellbot>? & <cellright>? & <cellshad>?) \cellx |
<celltop> | \clbrdrt <brdr> |
<cellleft> | \clbrdrl <brdr> |
<cellbot> | \clbrdrb <brdr> |
<cellright> | \clbrdrr <brdr> |
<cellshad> | <cellpat>? \clcfpat? & \clcbpat? & \clshdng |
<cellpat> | \clbghoriz | \clbgvert | \clbgfdiag | \clbgbdiag | \clbgcross | \clbgdcross | \clbgdkhor | \clbgdkvert | \clbgdkfdiag | \clbgdkbdiag | \clbgdkcross | \clbgdkdcross |
Note for <tbldef> that the number of \cellxs must match the number of \cells in the \row.
The following control words further define options for each row of the table.
Control word | Meaning | |
\trowd | Sets table row defaults. | |
\tcelld | Sets table cell defaults. | |
\trgaphN | Half the space between the cells of a table row in twips. | |
\cellxN | Defines 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 the table cell are merged with those of the preceding cell. | |
Row Formatting | ||
\trql | Left-justifies a table row with respect to its containing column. | |
\trqr | Right-justifies a table row with respect to its containing column. | |
\trqc | Centers a table row with respect to its containing column. | |
\trleftN | Position of the leftmost edge of the table with respect to the left edge of its column. | |
\trrhN | Height of a table row in twips. When 0, the height is sufficient for all the text in the line; when positive, the 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. | |
\trhdr | Table row header. This row should appear at the top of every page the current table appears on. | |
\trkeep | Table row keep together. This row cannot be split by a page break. This property is assumed to be off unless the control word is present. | |
Bidirectional Controls | ||
\rtlrow | Cells in this table row will have right-to-left precedence. | |
\ltrrow | Cells in this table row will have left-to-right precedence (the default). | |
Row Borders | ||
\trbrdrt | Table row border top. | |
\trbrdrl | Table row border left. | |
\trbrdrb | Table row border bottom. | |
\trbrdrr | Table row border right. | |
\trbrdrh | Table row border horizontal (inside). | |
\trbrdrv | Table row border vertical (inside). | |
Cell Borders | ||
\clbrdrb | Bottom table cell border. | |
\clbrdrt | Top table cell border. | |
\clbrdrl | Left table cell border. | |
\clbrdrr | Right table cell border. | |
Cell Shading and Background Pattern | ||
\clshdngN | N is the shading of a table cell in hundredths of a percent. This control should be included in RTF along with cell border information. | |
\clbghoriz | Specifies a horizontal background pattern for the cell. | |
\clbgvert | Specifies a vertical background pattern for the cell. | |
\clbgfdiag | Specifies a forward diagonal background pattern for the cell (\\\\). | |
\clbgbdiag | Specifies a backward diagonal background pattern for the cell (////). | |
\clbgcross | Specifies a cross background pattern for the cell. | |
\clbgdcross | Specifies a diagonal cross background pattern for the cell. | |
\clbgdkhor | Specifies a dark horizontal background pattern for the cell. | |
\clbgdkvert | Specifies a dark vertical background pattern for the cell. | |
\clbgdkfdiag | Specifies a dark forward diagonal background pattern for the cell (\\\\). | |
\clbgdkbdiag | Specifies a dark backward diagonal background pattern for the cell (////). | |
\clbgdkcross | Specifies a dark cross background pattern for the cell. | |
\clbgdkdcross | Specifies a dark diagonal cross background pattern for the cell. | |
\clcfpatN | N is the line color of the background pattern. | |
\clcbpatN | N is the background color of the background pattern. | |
Vertical Text Alignment | ||
\clvertalt | Text is top-aligned in cell (the default). | |
\clvertalc | Text is centered vertically in cell. | |
\clvertalb | Text is bottom-aligned in cell. | |
\cltxlrtb | Vertical text aligned left (direction bottom up). | |
\cltxtbrl | Vertical text aligned right (direction top down). |
The following is an example of table text:
\par \trowd \trqc\trgaph108\trrh280\trleft36
\clbrdrt\brdrth \clbrdrl\brdrth \clbrdrb\brdrdb
\clbrdrr\brdrdb \cellx3636\clbrdrt\brdrth
\clbrdrl\brdrdb \clbrdrb\brdrdb \clbrdrr\brdrdb
\cellx7236\clbrdrt\brdrth \clbrdrl\brdrdb
\clbrdrb\brdrdb \clbrdrr\brdrdb \cellx10836\pard \intbl
\cell \pard \intbl \cell \pard \intbl \cell \pard \intbl \row
\trowd \trqc\trgaph108\trrh280\trleft36 \clbrdrt\brdrdb
\clbrdrl\brdrth \clbrdrb \brdrsh\brdrs \clbrdrr\brdrdb
\cellx3636\clbrdrt\brdrdb \clbrdr \brdrdb
\clbrdrb\brdrsh\brdrs \clbrdrr\brdrdb
\cellx7236\clbrdrt\brdrdb \clbrdr \brdrdb
\clbrdrb\brdrsh\brdrs \clbrdrr\brdrdb \cellx10836\pard
\intbl \cell \pard \intbl \cell \pard \intbl \cell \pard
\intbl \row \pard