Autonumbering Task Topic Titles for Tutorials in Webhelp

dgallo
Posts: 84

Autonumbering Task Topic Titles for Tutorials in Webhelp

Tue Aug 29, 2017 11:05 pm

We are using a series of task topics to create one large tutorial. In the DITA webhelp, is it possible to automatically assign a number in the title of each task topic. We would only want this customization to apply to the task topics that make a tutorial, not for normal task topics.

For example:

T-1000: Introduction Tutorial
Topic (1: Title)
Topic (1.1 Title)
Topic (2: Title)
Topic (2.1 Title)
Topic (3: Title)
Topic (4: Title)
Topic (4.1: Title)
Topic (4.2: Title)
bogdan_cercelaru
Posts: 204

Re: Autonumbering Task Topic Titles for Tutorials in Webhelp

Wed Aug 30, 2017 5:02 pm

Hello,

Assuming that you are using the chunk="to-content" attribute to obtain one large tutorial from a series of topics, you could use the outputclass attribute and the CSS Counters to obtain what you required.
The outputclass attribute should be set on the root element of the topic that will be included in the bigger tutorial. Below is an example of a CSS that you can use:

Code: Select all

body {
    counter-reset: section;
}
.custom-section {
    counter-reset: subsection;
}
.custom-section>.title::before {
    counter-increment: section;
    content: counter(section) ": Title";
}
.custom-subsection>.title::before{
    counter-increment: subsection;
    content: counter(section) "." counter(subsection) ": Title";
}


Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 2 guests