Stepresult not shown if pdf

Post here questions and problems related to editing and publishing DITA content.
MWdal
Posts: 20
Joined: Thu Jun 09, 2022 2:49 pm

Stepresult not shown if pdf

Post by MWdal »

Hello,
We run a Dita Map PDF - based on HTML5 & CSS transformation scenario, with parameter args.gen.task.lbl = YES. For the topic type Task we still don't see the text Result: for the tag stepresult in the pdf. Other labels like Before you begin, About this task, are shown. Is there another parameter for stepresult, or am I missing something else?
Using Oxygen v.24.1, Dita OT 3.7.
thanks,
Mikael
julien_lacour
Posts: 498
Joined: Wed Oct 16, 2019 3:47 pm

Re: Stepresult not shown if pdf

Post by julien_lacour »

Hello Mikael,

The 'args.gen.task.lbl' property only tells the transformation to show the task labels, not the step ones.
As stepresult is a child of step, it isn't processed by this property.

Regards,
Julien
julien_lacour
Posts: 498
Joined: Wed Oct 16, 2019 3:47 pm

Re: Stepresult not shown if pdf

Post by julien_lacour »

You could create such labels directly from a custom CSS stylesheet, like this:

Code: Select all

*[class ~= "task/stepresult"]::before {
  font-weight: bold;
  content: "Step Result\A";
}
Regards,
Julien
MWdal
Posts: 20
Joined: Thu Jun 09, 2022 2:49 pm

Re: Stepresult not shown if pdf

Post by MWdal »

Thanks Julien, that works fine.
I also added a padding in that part -

Code: Select all

padding-left: 10px;
.
That works on the label, but not on the rest of the text in the step result. Is there a way to get the same indent on the complete step result text?
/Mikael
julien_lacour
Posts: 498
Joined: Wed Oct 16, 2019 3:47 pm

Re: Stepresult not shown if pdf

Post by julien_lacour »

Hi Mikael,

You need to move the padding into a separate rule applying on the stepresult itself:

Code: Select all

*[class ~= "task/stepresult"] {
  padding-left: 10px;
}

*[class ~= "task/stepresult"]::before {
  font-weight: bold;
  content: "Step Result\A";
}
Then the ::before element should follow.

Regards,
Julien
Post Reply