### 15.6 Converting tables to print RTF

In Word, tables are not objects. They are just paragraphs with border properties that make them look like rows.

Before you attempt the fine tuning described in this section:

- To specify output formats and general options for DITA table types, see §6.9 Specifying formats and options for tables.
- To map table elements to output formats using attributes, see §6.3.2 Mapping table outputclass attributes to formats.
- To define properties for each table format, see §7.7 Configuring table output formats.

You can also use configuration settings or PI markers to control some table characteristics for RTF output:

Table and column widths

Table title position

Cell properties

Straddled columns

Other characteristics might be more problematic:

Straddled rows

Tables with too many columns

Table and column widths

Define default widths for tables and table columns in a table-format configuration file; see §7.7 Configuring table output formats. To specify a different table width for an individual table generated from DITA <simpletable>, <choicetable>, or <properties> element, insert a SimpleTableWidth PI marker just before or at the beginning of the element. For example:

    <?dtrtf SimpleTableWidth="4.5in" ?>

DITA definition lists and parameter lists are best rendered as tables in RTF output. These element types do not allow width settings in DITA XML. However, you can specify either relative or absolute column widths for RTF output, with a SimpleTableRelCol PI marker placed just before or at the beginning of the element. For example, for relative column widths:

    <?dtrtf SimpleTableRelCol="2* 4*" ?>

This simply acts exactly like DITA @relcolwidth for the tables generated from those lists. For absolute column widths, you can use any units allowed in DITA; for example:

    <?dtrtf SimpleTableRelCol="1in 36pt 5pc" ?>

You can combine both SimpleTableWidth and SimpleTableRelCol values in a single PI marker, separated by a space; see §38.1.1 Understanding DITA2Go PI marker syntax.

Table title position

To reposition table titles:

    [Tables]
    ; TableTitles = 0 to leave alone, 1 to put at top, 2 to put at bottom
    TableTitles=0

Cell properties

To adjust cell properties for all tables:

    [Tables]
    ; TableRules = Cell (standard default), None (help default), or one
    ;   of the Box types: Box, Double, Thick, Shadow, Para (variable)
    TableRules=Cell
    ; TableFill = AsIs (default), ColorOnly, ShadingOnly, None
    TableFill=AsIs

Cell properties set in [Tables] apply to all tables in your document, and override values of the same properties specified in a table-format configuration file; see §7.7.4 Configuring cell format properties.

TableRules determines whether the border values set in a table-format configuration file take effect. If TableRules has any value except Cell, DITA2Go does not write borders. If TableFill=None or ColorOnly, DITA2Go ignores the table-format configuration settings for shading.

Straddled columns

Given the opportunity, Word handles table cells that straddle columns by combining the cells involved in the straddle into a single cell. Because this might not be what you want in Word output, by default DITA2Go does not combine the cells; however, you can override the default. To combine column-straddling cells into a single cell:

    [Tables]
    ; MergeStradCells = No (default) or Yes (combine col-straddling cells)
    MergeStradCells=Yes

Note: For WinHelp output, the default value of MergeStradCells is Yes (the opposite of the default for Word); see §17.5.2 Adjusting table appearance.

Straddled rows

Word 8/97 and later versions can handle straddled rows in tables; Word 7/95 cannot.

Tables with too many columns

Word seems incapable of handling tables that have more than 63 columns. Such a table ends up in Word with all columns beyond the 63rd merged into the last column allowed, making that cell much taller than the rest, in every row.

Previous Topic: 15.5.4.2 Mapping file names, extension, or location

Next Topic: 15.7 Managing graphics for print RTF

Parent Topic: 15. Converting to print RTF

Sibling Topics:

15.1 Setting up a print RTF project

15.2 Adjusting output for different versions of Word

15.3 Converting paragraph and character formats

15.4 Modifying text appearance

15.5 Converting cross references and hypertext links

15.7 Managing graphics for print RTF

15.8 Including RTF code for Word output

15.9 Turning on revision tracking in Word

15.10 Managing Word output after conversion

15.11 Converting to OpenOffice or StarOffice

Table of Contents • Index