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 the “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, 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 will be transferred from the corresponding object on the reference page to the object in the topic.

Keep in mind that the formatting is only applied to matching row or cell element names. 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.