.RTF
Rich Text Format
Introduction
RTF is a document format that Microsoft introduced in 1987 for exchanging formatted text between word processors. It is plain text with formatting written as control words, so almost any word processor can read it and the source stays readable. The last version of the specification, 1.9.1, was published in 2008.
Software
- Microsoft Word (Windows, macOS, web, mobile)
- LibreOffice Writer (Windows, macOS, Linux)
- TextEdit (macOS)
- Google Docs (web browsers)
- Pandoc (command line converter)
Structure
An RTF document is one group in braces that starts with \rtf1. Inside,
control words begin with a backslash and may take a number, such as \b
for bold, \b0 to end it, \fs24 for a 12 point font (sizes are
in half points) and \par to end a paragraph. Nested groups in braces keep
formatting changes local. The header defines tables of fonts and colours that the
text then refers to by number. Characters outside ASCII are written as escapes such as
\'e9 or \u233?.
{\rtf1\ansi\deff0
{\fonttbl{\f0 Times New Roman;}}
\f0\fs24 Plain text, {\b bold text} and plain again.\par
}