Custom Ruling and Shading

Applying ruling and shading to specific table rows and cells requires additional forethought and setup.

DITA-FMx allows you to apply custom ruling and shading to table rows or cells based on the outputclass attribute. Because there is no option to control this formatting through EDD context rules, you must set up a representative table on an “fmx-tableformat” reference page in the structure application templates. A sample page has been added in the default DITA-FMx Topic and Book templates.

To enable this feature, you must enable the Apply Custom Ruling and Shading option in the Authoring Options dialog.

On this reference page (must be created if it doesn’t exist), create a text frame and add a structure flow that contains the table types for which you want to provide formatting. Use the Table > Row Format or Table > Custom Ruling and Shading commands to assign the desired formatting to a row or cell. Then set the outputclass attribute of that formatted row or cell to the value you want to use to identify that formatting. Save the template. Be sure to make similar modifications to both the Topic and Book templates.

After setting up the template, apply the appropriate name to the outputclass attribute of row or cell elements in your DITA topic files. When you save the file, the formatting is transferred from the object on the reference page to the corresponding object in the topic.

Keep in mind that the formatting is only applied to matching row or cell elements. Don’t set the outputclass on other table objects (thead, tbody, etc.). For example the formatting of an entry element on the reference page with an outputclass of “darkblue” will not be applied to an stentry element with an outputclass of “darkblue,” only to another entry element.

Also, note that these properties are only applied by row or cell. The properties applied by row are: row min/max height, row start position, and row keep w/ next/previous. The properties applied by cell are ruling and shading (coloring). In order to apply both row and cell properties, you must define both types of schemes in your reference page table. Developing very complex ruling, shading, etc. layouts can be very difficult, so start with a simple case and slowly add more properties until you understand how this is done.