#### 7.4.7 Applying CSS and RTF code to output formats

You can apply CSS code or RTF control words to all instances of a text or table format:.

Apply CSS code with property css

Apply RTF code with property rtf.

You can even assign both properties css and rtf to the same format.

Apply CSS code with property css

Values for property css take the usual CSS form, and must follow the usual CSS rules. Each css setting must either fit on a single line or reference a macro. Within a css value, observe the following:

- To include a line break, use \n. For example:

  [FormatName]
  css = padding: 2 6 4 0;\n width: 80%;

- To retain a backslash in CSS, double it.
- To add a leading or trailing space, use \~. Normal leading and trailing spaces are removed.

Apply RTF code with property rtf

Values for property rtf use the usual RTF control words. Each rtf setting must either fit on a single line, or reference a macro. Within an rtf value, observe the following:

- To retain a backslash in an rtf setting, double the backslash. For example:

  [FormatName]
  rtf = \\lang1033 \\widctlpar\\noproof

- To add a leading or trailing space, use \~. Normal leading and trailing spaces are removed.

Previous Topic: 7.4.6 Modifying DITA2Go default output formats

Next Topic: 7.4.8 Assigning content-adding properties to formats

Parent Topic: 7.4 Understanding how to define output formats

Sibling Topics:

7.4.1 Naming output formats

7.4.2 Assigning values to format properties

7.4.3 Documenting output formats

7.4.4 Understanding the basis of format properties

7.4.5 Basing format properties on other formats

7.4.6 Modifying DITA2Go default output formats

7.4.8 Assigning content-adding properties to formats

Table of Contents • Index