Document Formatting Properties

After the information group (if there are any), there may be some document formatting control words (described as <docfmt> in the document area syntax description). These control words specify the attributes of the document, such as margins and footnote placement. These attributes must precede the first plain-text character in the document.

The control words that specify document formatting are listed in the following table (measurements are in twips; a twip is one-twentieth of a point). For omitted control words, RTF uses the default values.

Control word Meaning
\deftabN Default tab width in twips (the default is 720).
\hyphhotzN Hyphenation hot zone in twips (the amount of space at the right margin in which words are hyphenated).
\hyphconsecN N is the maximum number of consecutive lines that will be allowed to end in a hyphen. 0 means no limit.
\hyphcaps Toggles hyphenation of capitalized words (the default is on). Append 1 or leave control word by itself to toggle property on; append 0  to turn it off.
\hyphauto Toggles automatic hyphenation (the default is off). Append 1 or leave control word by itself to toggle property on; append 0  to turn it off.
\linestartN Beginning line number (the default is 1).
\fracwidth Uses fractional character widths when printing (QuickDraw only).
\*\nextfile Destination. The argument is the name of the file to print or index next; it must be enclosed in braces. This is a destination control word.
\*\template Destination. The argument is the name of a related template file; it must be enclosed in braces. This is a destination control word.
\makebackup Backup copy is made automatically when the document is saved.
\defformat Tells the RTF reader that the document should be saved in RTF format.
\psover Prints PostScript over the text.
\doctemp Document is a boilerplate document. For Word for Windows, this is a template; for Word for the Macintosh, this is a stationery file.
\deflangN Defines the default language used in the document used with a \plain control word. See the section "Character Formatting Properties" on page 34 of this Application Note for a list of possible values for N.
\deflangfe Default language ID for Asian versions of Word.
\windowcaption Sets the caption text for the document window. This is a string value.
\doctypeN An integer (0-2) that describes the document type for AutoFormat.

0General Document (for formatting most documents, the default)

1Letter (for formatting letters, and used by Letter Wizard)

2E-mail (for formatting e-mail, and used by WordMail)

\fromtext Indicates document was originally plain text.
Document views and zoom level
\viewkindN An integer (0-5) that represents the view mode of the document.

0None

1Page Layout view

2Outline view

3Master Document view

4Normal view

5Online Layout view

\viewscaleN Zoom level of the document; the N argument is a value representing a percentage (the default is 100).
\viewzkN An integer (0 to 2) that represents the zoom kind of the document.

0None

1Full page

2Best fit

\private Obsolete destination. It has no leading \*. It should be skipped.
Footnotes and Endnotes
\fetN Footnote/endnote type. This indicates what type of notes are present in the document.

0Footnotes only or nothing at all (the default).

1Endnotes only.

2Footnotes and endnotes both.

For backward compatibility, if \fet1 is emitted, \endnotes or \enddoc will be emitted along with \aendnotes or \aenddoc. RTF readers that understand \fet will need to ignore the footnote-positioning control words, and use the endnote control words instead.

\ftnsep Text argument separates footnotes from the document. This is a destination control word.
\ftnsepc Text argument separates continued footnotes from the document. This is a destination control word.
\ftncn Text argument is a notice for continued footnotes. This is a destination control word.
\aftnsep Text argument separates endnotes from the document. This is a destination control word.
\aftnsepc Text argument separates continued endnotes from the document. This is a destination control word.
\aftncn Text argument is a notice for continued endnotes. This is a destination control word.
\endnotes Footnotes at the end of the section (the default).
\enddoc Footnotes at the end of the document.
\ftntj Footnotes beneath text (top justified).
\ftnbj Footnotes at the bottom of the page (bottom justified).
\aendnotes Endnotes at end of section (the default).
\aenddoc Endnotes at end of document.
\aftnbj Endnotes at bottom of page (bottom justified).
\aftntj Endnotes beneath text (top justified).
\ftnstartN Beginning footnote number (the default is 1).
\aftnstartN Beginning endnote number (the default is 1).
\ftnrstpg Restart footnote numbering each page.
\ftnrestart Footnote numbers restart at each section. Microsoft Word for the Macintosh uses this control to restart footnote numbering at each page.
\ftnrstcont Continuous footnote numbering (the default).
\aftnrestart Restart endnote numbering each section.
\aftnrstcont Continuous endnote numbering (the default).
\ftnnar Footnote numbering—Arabic numbering (1, 2, 3, ...)
\ftnnalc Footnote numbering—Alphabetic lowercase (a, b, c, ...)
\ftnnauc Footnote numbering—Alphabetic uppercase (A, B, C, ...)
\ftnnrlc Footnote numbering—Roman lowercase (i, ii, iii, ...)
\ftnnruc Footnote numbering—Roman uppercase (I, II, III, ...)
\ftnnchi Footnote numbering—Chicago Manual of Style (*, †, ‡, §)
\aftnnar Endnote numbering—Arabic numbering (1, 2, 3, ...)
\aftnnalc Endnote numbering—Alphabetic lowercase (a, b, c, ...)
\aftnnauc Endnote numbering—Alphabetic uppercase (A, B, C, ...)
\aftnnrlc Endnote numbering—Roman lowercase (i, ii, iii, ...)
\aftnnruc Endnote numbering—Roman uppercase (I, II, III, ...)
\aftnnchi Endnote numbering—Chicago Manual of Style (*, †, ‡, §)
Page Information
\paperwN Paper width in twips (the default is 12,240).
\paperhN Paper height in twips (the default is 15,840).
\pszN Used to differentiate between paper sizes with identical dimensions under Windows NT. Values 1–41 correspond to paper sizes defined in DRIVINI.H in the Windows 3.1 SDK (DMPAPER_ values). Values greater than or equal to 42 correspond to user-defined forms under Windows NT.
\marglN Left margin in twips (the default is 1800).
\margrN Right margin in twips (the default is 1800).
\margtN Top margin in twips (the default is 1440).
\margbN Bottom margin in twips (the default is 1440).
\facingp Facing pages (activates odd/even headers and gutters).
\gutterN Gutter width in twips (the default is 0).
\margmirror Switches margin definitions on left and right pages. Used in conjunction with \facingp.
\landscape Landscape format.
\pgnstartN Beginning page number (the default is 1).
\widowctrl Enable widow and orphan control.
Linked Styles
\linkstyles Update document styles automatically based on template.
Compatibility Options
\notabind Don't add automatic tab stop for hanging indent.
\wraptrsp Wrap trailing spaces onto the next line.
\prcolbl Print all colors as black.
\noextrasprl Don't add extra space to line height for showing raised/lowered characters.
\nocolbal Don't balance columns.
\cvmme Treat old-style escaped quotation marks (\") as current style ("") in mail merge data documents.
\sprstsp Suppress extra line spacing at top of page. Basically, this means to ignore any line spacing larger than Auto at the top of a page.
\sprsspbf Suppress space before paragraph property after hard page or column break.
\otblrul Combine table borders as done in Word 5.x for the Macintosh. Contradictory table border information is resolved in favor of the first cell.
\transmf Metafiles are considered transparent; don't blank the area behind metafiles.
\ swpbdr If a paragraph has a left border (not a box) and the Different Odd And Even or Mirror Margins check box is selected, Word will print the border on the right for odd-numbered pages.
\brkfrm Show hard (manual) page breaks and column breaks in frames.
\sprslnsp Suppress extra line spacing like WordPerfect version 5.x.
\subfontby
size
Substitute fonts based on size first.
\truncatefont
height
Round down to the nearest font size instead of rounding up.
\truncex Don't add leading (extra space) between rows of text
\bdbfhdr Print body before header/footer. Option for compatibility with Word for the Macintosh 5.x.
\dntblnsbdb Don't balance SBCS/DBCS characters. Option for compatibility with Word 6.0 (Japanese).
\expshrtn Expand character spaces on line-ending with shift+return. Option for compatibility with Word 6.0 (Japanese).
\lytexcttp Don’t center exact line height lines.
\lytprtmet Use printer metrics to lay out document.
\msmcap Small caps like Word for the Macintosh 5.x.
\nolead No external leading. Option for compatibility with Word for the Macintosh 5.x
\nospaceforul Don't add space for underline. Option for compatibility with Word 6.0 (Japanese).
\noultrlspc Don't underline trailing spaces. Option for compatibility with Word 6.0 (Japanese).
\noxlattoyen Don't translate backslash to Yen sign. Option for compatibility with Word 6.0 (Japanese).
\oldlinewrap Lines wrap like Word 6.0.
\sprsbsp Suppress extra line spacing at bottom of page.
\sprstsm Does nothing. This keyword should be ignored.
\wpjst Do full justification like WordPerfect 6.x for Windows.
\wpsp Set the width of a space like WordPerfect 5.x.
\wptab Advance to next tab stop like WordPerfect 6.x.
Forms
\formprot This document is protected for forms.
\allprot This document has no unprotected areas.
\formshade This document has form field shading on.
\formdisp This document currently has a forms drop-down box or check box selected.
\printdata This document has print form data only on.
Revision Marks
\revprot This document is protected for revisions. The user can edit the document, but revision marking cannot be disabled.
\revisions Turns on revision marking.
\revpropN Argument indicates how revised text will be displayed: 0 for no properties shown; 1 for bold; 2 for italic; 3 for underline (the default); 4 for double underline.
\revbarN Vertical lines mark altered text, based on the argument: 0 for no marking; 1 for left margin; 2 for right margin; 3 for outside (the default: left on left pages, right on right pages).
Comments (Annotations)
\annotprot This document is protected for comments (annotations). The user cannot edit the document but can insert comments (annotations).
Bidirectional Controls
\rtldoc This document will be formatted to have Arabic-style pagination.
\ltrdoc This document will have English-style pagination (the default).

Note that the three document-protection control words (\formprot, \revprot, and \annotprot) are mutually exclusive; only one of the three can apply to any given document. Also, there is currently no method for storing passwords in RTF, so any document that associates a password with a protection level will lose the password protection in RTF.

For more information about bidirectional controls, see “Bidirectional Language Support” in this Application Note.

Page Borders
\pgbrdrhead Page border surrounds header.
\pgbrdrfoot Page border surrounds footer.
\pgbrdrt Page border top.
\pgbrdrb Page border bottom.
\pgbrdrl Page border left.
\pgbrdrr Page border right.
\brdrartN Page border art; the N argument is a value from 1-165 representing the number of the border.
\pgbrdroptN 8Page border measure from text. Always display in front option is set to off.

32Page border measure from edge of page. Always display in front option is set to on.

40Page border measure from edge of page. Always display in front option is set to off.

\pgbrdrsnap Align paragraph borders and table edges with page border.

The color, width, border style, and border spacing keywords for page borders are the same as the keywords defined for paragraph borders.