Hi, all!
I know it perhaps isn't the best DITA, but is there a way to get an <ol> to continue numbering inside of a <step>?
For example, here's how it looks currently in a task:
1. Step one here.
2. Step two here.
a. Substep here.
b. Substep here.
1. Legacy third layer <ol>.
2. Legacy third layer <ol>.
Notice that the legacy third layer starts numbering at 1. no matter what.
I would like it to look like this:
1. Step one here.
2. Step two here.
a. Substep here.
b. Substep here.
i. Legacy third layer <ol>.
ii. Legacy third layer <ol>.
Notice that the legacy third layer <ol> continues the numbering hierarchy.
How can I make this happen? Using a counter?
Thanks in advance!
Josh Monacella
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi Josh,
You can add an outputclass to your <ol> in your dita file like below:
<ol outputclass="ol_numbering" id="ol_1">
Now we can use this outputclass in Native PDF template CSS file to get desired look and feel. In your case you can add something like below:
ol.ol_numbering {
list-style-type: lower-roman;
}
Give this a try and let us know how it goes. Feel free to write back for any query/doubt you have.
Thanks and Regards,
Surbhi Maheshwari
Can you share the DITA source text?
I sure can! Here is a source sample:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "technicalContent/dtd/task.dtd">
<task id="GUID-b6914350-e06d-476e-8db3-ee2815e69bf8">
<title>Test TASK</title>
<taskbody>
<context>
<p>This is a test to see the output of the task topic.</p>
</context>
<steps>
<step>
<cmd>Step 1.</cmd>
</step>
<step>
<cmd>Step 2.</cmd>
</step>
<step>
<cmd>Step 3.</cmd>
<substeps id="substeps_1">
<substep>
<cmd>Substep 1.</cmd>
</substep>
<substep>
<cmd>Substep 2.</cmd>
<info>
<ol id="ol_1">
<li>This is an <ol> inside of substep 2. It should continue the numbering hierarchy. In this case, it should lead with an "i." not a "1."</li>
<li>This is <ol> <li> 2.</li>
<li>this is <ol> <li> 3.</li>
</ol>
</info>
</substep>
</substeps>
</step>
</steps>
</taskbody>
</task>
(Screenshot of the code.)
Let me know if you need any additional info!
thanks!
Josh
Views
Replies
Total Likes
Thanks, Josh. Do you need the customized numbering in the output or while editing? If it is for the output then let us know the output formats. Using CSS it can be achieved. Based on the need we shall share specific CSS code snippets.
Thank YOU for the lightning fast response!
I need the customized numbering in the output, specifically Native PDF.
Thanks again!!
Josh
Views
Replies
Total Likes
Hi Josh,
You can add an outputclass to your <ol> in your dita file like below:
<ol outputclass="ol_numbering" id="ol_1">
Now we can use this outputclass in Native PDF template CSS file to get desired look and feel. In your case you can add something like below:
ol.ol_numbering {
list-style-type: lower-roman;
}
Give this a try and let us know how it goes. Feel free to write back for any query/doubt you have.
Thanks and Regards,
Surbhi Maheshwari
As always, I really appreciate your help!! This is working perfectly for our legacy material.
Thanks again!
Josh
Views
Replies
Total Likes