Numbering single step procedures in task

Having trouble installing Oxygen PDF Chemistry? Got a bug to report? Post it all here.
ThomasX
Posts: 6
Joined: Tue Jun 12, 2018 3:32 pm

Numbering single step procedures in task

Post 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.
Dan
Posts: 501
Joined: Mon Feb 03, 2003 10:56 am

Re: Numbering single step procedures in task

Post 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
ThomasX
Posts: 6
Joined: Tue Jun 12, 2018 3:32 pm

Re: Numbering single step procedures in task

Post by ThomasX »

Thank you very much. This works for me.
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Numbering single step procedures in task

Post by chrispitude »

My company also uses different formatting for single-step procedures, so it seems like a good enhancement to have.
Dan
Posts: 501
Joined: Mon Feb 03, 2003 10:56 am

Re: Numbering single step procedures in task

Post by Dan »

I recorded an improvement request for this.

Many regards,
Dan
julien_lacour
Posts: 495
Joined: Wed Oct 16, 2019 3:47 pm

Re: Numbering single step procedures in task

Post 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
Post Reply