This section summarizes the text/richtext type. A full explanation of richtext can be found in RFC 1341, the MIME specification.
Richtext is a simple markup language for plain text, like LaTeX or nroff or Scribe. A document in richtext format consists of plain text ``marked up'' with formatting commands. The formatting commands are used to change fonts, to format paragraphs, and to lay out pages. For those with some word processing experience, MIME richtext isn't in any way related to Microsoft Richtext.
The formatting commands are words surrounded by angle brackets (<>), such as <bold>. Each occurrence of a command is balanced later on by a negating command beginning with a forward slash or solidus (/), such as </bold>.
There are only three exceptions to this balancing rule:
The list of pre-defined richtext commands follows.
Font selection commands:
Paragraph formatting commands:
Page layout commands:
Character set selection commands:
Miscellaneous commands:
Each positive formatting command affects all subsequent text until the matching negative formatting command. Such pairs of formatting commands must be properly balanced and nested. Thus, a proper way to describe text in bold italics is:
<bold><italic>the-text</italic></bold>
or, alternatively,
<italic><bold>the-text</bold></italic>
but, in particular, the following is illegal richtext:
<bold><italic>the-text</bold></italic>
No special behavior is required for the Tab (aka HT or control-I) character, but when fixed-width fonts are in use, the common semantics of the TAB character may be observed, i.e. that a Tab moves to the next column position that is a multiple of 8.
A line break (CRLF) is interpreted as a soft line break, which is treated as horizontal white space. To include a hard line break (one that must be displayed as such), the <nl> or <paragraph> formatting constructs should be used.
Consider this richtext body fragment:
<bold>Now</bold> is the time for <italic>all</italic> good men <smaller>(and <lt>women>)</smaller> to <ignoreme></ignoreme> come to the aid of their <nl> beloved <nl><nl>country. <comment> Stupid quote! </comment> -- the end
The example fragment above represents this formatted text:
Note that the final display of a message in richtext format may be quite different from that which was intended, simply because display devices and richtext implementations may differ in capabilities. A richtext message that may display beautifully with full italic and bold characters on an X Window System display may look terrible on a 24-by-80 fixed-font ASCII terminal that can only show plain or bold text blocks.
Richtext message parts are specified with the type text/richtext. To compose a message with richtext parts, these mhn directives may be used:
To insert a text file containing richtext formatting commands:
#text/richtext filenameTo compose a portion of a draft with richtext:
#<text/richtext
lines of text with richtext formatting commands
#
Of course, external body parts may also be specified with the
directive #@text/richtext followed by appropriate parameters
(see section ).