DITA: Combining topics
As I recommended in DITA: Specializations (task, concept, reference)?, author in the base topic type. You won't find yourself doing acrobatics to combine topics. However, you may want to combine topics in order to create nested subheadings.
Combining topics with the chunk attribute
The chunk="to-content"
attribute allows you to merge child topics into a
parent topic in your navigation. You add the chunk
attribute on a
parent topicref
.
If you want the child topics to actually appear in the table of contents, use the "yes" value.
Although the chunk attribute works easily enough in the TOC area, it's problematic with linking. Chunking creates issues with relationship tables. (See DITA: Limitations with the chunk=”to-content” attribute in relationship tables.)
Combining topics by nesting elements
A better way to combine topics is by nesting elements. When you nest elements, you add
multiple taskbody
or conbody
elements inside each
other. Here's an example of how nest task elements.
With nesting concepts, here's what that looks like
Basically, just bookend the individual task
or
concept
elements inside one task
or
concept
element that functions as a container.
Using an outputclass for a third-level section
You can also "cheat" to
combine topics against the design of the DITA structure by crafting an
outputclass
attribute to look like a third-level heading: like
this:
Then
add p.level3
class to the webhelp stylesheet. Assuming your
OxygenXML install directory begins in your /Applications
folder, the path would be as follows:
/Applications/oxygenAuthor/frameworks/dita/DITA-OT/plugins/com.oxygenxml.webhelp/oxygen-webhelp/resources
Open the webhelp_topic.css file, scroll down to the bottom, and add something like this for your style:
This is more of a workaround hack than any good technique. Sometimes you just need a third-level heading, though, and this works.
About Tom Johnson
I'm an API technical writer based in the Seattle area. On this blog, I write about topics related to technical writing and communication — such as software documentation, API documentation, AI, information architecture, content strategy, writing processes, plain language, tech comm careers, and more. Check out my API documentation course if you're looking for more info about documenting APIs. Or see my posts on AI and AI course section for more on the latest in AI and tech comm.
If you're a technical writer and want to keep on top of the latest trends in the tech comm, be sure to subscribe to email updates below. You can also learn more about me or contact me. Finally, note that the opinions I express on my blog are my own points of view, not that of my employer.