Reply to: Formatting DITA TopicsJune 7, 2013 at 7:26 pm
If you are asking about output then using the outputclass attribute is one option, unless your special paragraphs can be uniquely identified some other way (using their relationship to other elements or another attribute). You might also want to look at specializing DITA, but that will add more complexity.
The basic strategy for using outputclass is as follows:
1) Decide on some unique value(s) to use in @outputclass that would allow you to uniquely identify the elements in question. You might simply choose “centered”, but a more descriptive value that describes the type of content it contains is usually a better strategy (ie: keeping your formatting out of your XML is almost always best). That way, if you decide in the future that this content should be right aligned, or have blue text, or whatever, then you can just make the change in the XSLT and your DITA markup will still make sense.
2) Modify the XSLT in the DITA OT for the particular output type(s) you are producing so that the value you set in (1) is used to style the content differently from the default.
To have XMetaL display these elements the same way as in your customized output then the CSS that displays your DITA topics while editing can probably be modified to render them in a similar way as well (a table would need to be thinner than 100% wide in order to see it rendered centered while authoring). Most of the time this will be a fairly easy change to the CSS that drives the DITA authoring.