You are previewing RTF Pocket Guide.
O'Reilly logo
RTF Pocket Guide

Book Description

Any programmer working with text files today needs a way to deal with Microsoft® Word documents and their underlying Rich Text Format. RTF is notoriously difficult to work with, and our handy quick reference is the only book available on what many developers call "this maddeningly unstructured format." Small and easy to use on the job, RTF Pocket Guide focuses on the "workhorse" codes that programmers can't do without, including text style codes, paragraph formatting codes, and page formatting codes -- all with many examples of real use.

Table of Contents

  1. RTF Pocket Guide
  2. A Note Regarding Supplemental Files
  3. 1. RTF Tutorial
    1. Why RTF?
    2. This Book's Approach
    3. RTF "Hello, World!"
    4. Overview of Simple RTF
    5. Basic RTF Syntax
      1. Newlines and Spaces in RTF
    6. Paragraphs
      1. About {\pard ... \par}
      2. Controlling Paragraph Justification and Centering
      3. Spacing Between Paragraphs
      4. Paragraph Indenting
      5. Paragraphs and Pagebreaks
      6. Double-Spacing
      7. Exact Paragraph Positioning
    7. Character Formatting
      1. Basic Character Formatting
      2. Font Commands
      3. Advice About {...} Groups
      4. RTF Escapes
        1. Escapes
        2. Nonbreaking space
        3. Nonbreaking hyphen
        4. Hyphenation point
      5. The \plain Formatting Command
      6. Unicode in RTF
        1. Support for the Unicode escapes
    8. Document Structure
      1. Document Prolog
      2. Font Table
      3. Color Table
      4. Stylesheet
      5. Info Group
        1. Defaults for some metadata fields
      6. Preliminaries
      7. Content
      8. End of Document
    9. Incidental Features
      1. The {\*\command ... } Construct
        1. Faking comments with {\*\command ... }
      2. Language Tagging
      3. Newspaper Columns
        1. Columns and sections
      4. Footnotes
      5. Changing Text Color
      6. Hyperlinks
      7. Page Margins
      8. Page Size and Orientation
      9. Line Drawing
      10. Embedding Images
      11. Overstrike in RTF
      12. Centering Vertically and Horizontally
      13. Symbols
    10. Styles
      1. Styles as the User Experiences Them
      2. Styles as They Are Represented
      3. RTF Stylesheet Syntax
      4. \sbasedon and Style Updating
        1. \additive on character style declarations
        2. Generating RTF: With or without styles?
    11. Tables
      1. One Row at a Time
      2. Building Tables
      3. Content that Stretches Rows
      4. Starting Tables Away from the Left Margin
      5. Widths-to-Offsets as an Algorithm
      6. Adding Borders
      7. Vertical Alignment in Cells
      8. Horizontal Alignment in Cells
      9. Horizontal and Vertical Alignment in Cells
  4. 2. Creating MS Windows Help Files
    1. Help-RTF Basics
    2. Hyperlinks and Popups
    3. More Topic Information
    4. Images
    5. Help-RTF's Peculiarities
    6. Learning More
  5. 3. Example Programs
    1. A Datebook Generator
    2. A Directory Lister
    3. An Origami CD Case Maker
    4. An RTF Metadata Extractor
    5. Remarks on Parsing
  6. 4. Reference Tables
    1. ASCII-RTF Character Chart
    2. RTF Language Codes
    3. Converting to Twips
  7. Index
  8. About the Author
  9. Copyright