Tables to Text

Converts all tables of the specified format(s) to text.

It may be necessary to convert some tables to text before applying the conversion table. This command prompts for the table format(s) to convert. If multiple formats need to be converted enter each format name separated with a space. The tables are converted to text, row by row and cell by cell, working from top to bottom and left to right. Each paragraph in the table cells become a new paragraph.

If the format names are added to the UnwrapTables parameter in the fm2dita.ini file, you will be prompted with a confirmation dialog rather than a text entry dialog. The UnwrapTablesPrefix parameter can be used to add a prefix to the paragraphs that result from the conversion process. Each of these INI parameters are space-delimited lists. If both lists have the same number of entries, the prefixes are applied to the content from the corresponding table. If the UnwrapTablesPrefix list doesn’t provide a corresponding entry, the first entry in that list will be used.

Refer to the information in Editing the fm2dita.ini File for additional information on these INI parameters.

Run this command before applying a conversion table.

Complex mapping option

If you have tables that require a variable or detailed mapping configuration, an expanded syntax may be used in the UnwrapTablesPrefix parameter. This starts by using a vertical bar (“|”) as the delimiter, then bracketed rules within each delimited region to specify a column number and a paragraph tag to match. When these rules match the condition in the table, a prefix can be assigned to the new paragraph tag or a new tag may be assigned.

The following describes the parameters of the syntax for this method:

UnwrapTablesPrefix=|{colnum:matchtag>prefixtag}|

Where:

colnum

The column number (starting with “1”) or asterisk (“*”) for any column.

matchtag

The paragraph tag to match or (“*”) for any tag.

prefixtag

The prefix to assign to the unwrapped table cell paragraph tag. If you want to assign a new tag name use “=” as the first character of the prefixtag parameter.

For example, use the following rules if you have a 2-column table, where the first column should always be converted to a paragraph tag named “icon”, and the second column tag name should be prefixed with “info-”.

UnwrapTablesPrefix=|{1:*>=icon}{2:*>info-}|

Note the use of the “=” to assign a tag name, and in both cases, this is mapped regardless of the paragraph tag name in each column.