DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion Formatting DITA Topics

  • thekilla20

    Formatting DITA Topics

    Participants 1
    Replies 2
    Last Activity 9 years, 3 months ago

    I'm having an issue trying to understand how to format my DITA general topic.

    Currently I'm using Xmetal Author Enterprise 8.0 on Windows 7 x64 and have a specific number of paragraphs and tables within a topic I wish to have centered while others remain the same.

    How would I go about doing this?


    Derek Read

    Reply to: Formatting DITA Topics

    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.



    Reply to: Formatting DITA Topics


    I've modified my outputclass values in my xml document, how would I go about modifying the XSLT in the DITA OT for both pdf and html so the attributes “centered” appear in my document output?

    Assuming I'm using stock CSS' for my program.


  • You must be logged in to reply to this topic.

Lost Your Password?