2.1.3.1.3 HTMLRTF Toggle Control Word

The HTMLRTF control word identifies fragments of RTF that were not in the original HTML content.<3>

 ; \htmlrtf or \htmlrtf1 or \htmlrtf0
 HTMLRTF = %x5C.68.74.6D.6C.72.74.66["0" / "1"]

This control word is used to mark regions of the RTF content that are the result of approximate format conversion and were not part of the original HTML content.

This control word complies with the semantics specified in [MSFT-RTF] regarding toggle control words. Therefore, \htmlrtf and \htmlrtf1 both represent enabling the control word.

Control word

State

Description

\htmlrtf

\htmlrtf1

BEGIN

The de-encapsulating RTF reader MUST NOT copy any subsequent text and control words in the RTF content until the state is disabled.

\htmlrtf0

END

This control word disables an earlier instance of \htmlrtf or \htmlrtf1, thereby allowing the de-encapsulating RTF reader to evaluate subsequent text and control words in the RTF content.

A de-encapsulating RTF reader MUST support the HTMLRTF control word within nested groups. The state of the HTMLRTF control word MUST transfer when entering groups and be restored when exiting groups, as specified in [MSFT-RTF].

This example shows how states are modified when nested via groups using bold, where \b enables bold and \b0 disables bold:

"\b bold { bold \b0 non-bold } bold \b0 non-bold non-bold { non-bold \b bold } non-bold"