Rich Text Format - Code Example

Code Example

As an example, the following RTF code:

{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard This is some {\b bold} text.\par }

is a document which would be rendered like this when read by a program that supports RTF:

This is some bold text.

Braces ({ and }) define a group; groups can be nested. A backslash (\) starts an RTF control code. A valid RTF document is a group that starts with the \rtf control code.

In the example above, the \b control code invokes boldface type; the example uses a group to limit the scope of the boldface control code. All other text characters will be rendered as plain text. The \par control code indicates the end of a paragraph.

Read more about this topic:  Rich Text Format

Famous quotes containing the word code:

    ...I had grown up in a world that was dominated by immature age. Not by vigorous immaturity, but by immaturity that was old and tired and prudent, that loved ritual and rubric, and was utterly wanting in curiosity about the new and the strange. Its era has passed away, and the world it made has crumbled around us. Its finest creation, a code of manners, has been ridiculed and discarded.
    Ellen Glasgow (1873–1945)

    Hollywood keeps before its child audiences a string of glorified young heroes, everyone of whom is an unhesitating and violent Anarchist. His one answer to everything that annoys him or disparages his country or his parents or his young lady or his personal code of manly conduct is to give the offender a “sock” in the jaw.... My observation leads me to believe that it is not the virtuous people who are good at socking jaws.
    George Bernard Shaw (1856–1950)