Numbering single step procedures in task

ThomasX
Posts: 6
Joined: Tue Jun 12, 2018 3:32 pm

Numbering single step procedures in task

Post by ThomasX » Tue Mar 31, 2020 1:27 pm

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.

Dan
Posts: 447
Joined: Mon Feb 03, 2003 10:56 am

Re: Numbering single step procedures in task

Post by Dan » Wed Apr 01, 2020 11:36 am

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

ThomasX
Posts: 6
Joined: Tue Jun 12, 2018 3:32 pm

Re: Numbering single step procedures in task

Post by ThomasX » Wed Apr 01, 2020 3:38 pm

Thank you very much. This works for me.

chrispitude
Posts: 174
Joined: Thu May 02, 2019 2:32 pm

Re: Numbering single step procedures in task

Post by chrispitude » Sun Apr 05, 2020 2:11 pm

My company also uses different formatting for single-step procedures, so it seems like a good enhancement to have.

Dan
Posts: 447
Joined: Mon Feb 03, 2003 10:56 am

Re: Numbering single step procedures in task

Post by Dan » Mon Apr 06, 2020 8:49 am

I recorded an improvement request for this.

Many regards,
Dan

julien_lacour
Posts: 84
Joined: Wed Oct 16, 2019 3:47 pm

Re: Numbering single step procedures in task

Post by julien_lacour » Thu May 21, 2020 1:16 pm

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

Post Reply