Expand my Community achievements bar.

SOLVED

Continue numbering if an OL is inside a step in AEM Guides?

Avatar

Level 3

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

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee

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

View solution in original post

6 Replies

Avatar

Level 3

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 &lt;ol&gt; inside of substep 2. It should continue the numbering hierarchy. In this case, it should lead with an &quot;i.&quot; not a &quot;1.&quot;</li>
<li>This is &lt;ol&gt; &lt;li&gt; 2.</li>
<li>this is &lt;ol&gt; &lt;li&gt; 3.</li>
</ol>
</info>
</substep>
</substeps>
</step>
</steps>
</taskbody>
</task>

 

joshm19816095_0-1714626480812.png

 

(Screenshot of the code.)

 

Let me know if you need any additional info!

 

thanks!

Josh

Avatar

Employee

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.

Avatar

Level 3

Thank YOU for the lightning fast response!

 

I need the customized numbering in the output, specifically Native PDF. 

 

Thanks again!!

Josh

Avatar

Correct answer by
Employee

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