Page 1 of 1

Numbering single step procedures in task

Posted: Tue Mar 31, 2020 1:27 pm
by ThomasX
Hi,
I am using XML Author 21.1 and I have some issues with procedures in tasks that just include a single step. When I publish to PDF using the out-of-the box DITA Map PDF - based on HTML5 & CSS transformation scenario, the step or command is not numbered or counted, independent, if created in the Dita file in a steps or steps-unordered structure. Procedures with multiple steps however are correctly numbered in the PDF output.
How can I get the number 1. or a bullet in front of a cmd in a single step procedure in the pdf output?
Thank you very much for your help.

Re: Numbering single step procedures in task

Posted: Wed Apr 01, 2020 11:36 am
by Dan
I checked the DITA-OT stylesheets. Indeed, the steps element that contains a single item is transformed in a structure like:

Code: Select all

<section>
      <div class="li step p">
                <span class="ph cmd">This is a command</span>
      </div>
</section>
This was in fact an improvement request: https://github.com/dita-ot/dita-ot/issues/175

You can use as workaround the following CSS rule:

Code: Select all


section:not([class]) > div.step {
	display:list-item;
	list-style-type:disc;
	margin-left: 2em;
}

Unfortunately is not possible to distinguish between a section generated by a "steps" or "steps-unordered", since the section element does not have a class attribute.

Many regards,
Dan

Re: Numbering single step procedures in task

Posted: Wed Apr 01, 2020 3:38 pm
by ThomasX
Thank you very much. This works for me.

Re: Numbering single step procedures in task

Posted: Sun Apr 05, 2020 2:11 pm
by chrispitude
My company also uses different formatting for single-step procedures, so it seems like a good enhancement to have.

Re: Numbering single step procedures in task

Posted: Mon Apr 06, 2020 8:49 am
by Dan
I recorded an improvement request for this.

Many regards,
Dan

Re: Numbering single step procedures in task

Posted: Thu May 21, 2020 1:16 pm
by julien_lacour
Hello,

Starting with Oxygen 22.1 you can use the @class attribute on <section> elements to identify if the single step is caming from ordered or unordered list.

Regards,
Julien