Skip to main content
hadih26673991
Inspiring
January 10, 2020
Question

How to set the start value of Ordered List (ol) in DITA to an arbitrary integer?

  • January 10, 2020
  • 1 reply
  • 3581 views

I am using FrameMkaer 2019 and DITA. In some cases, I need to set the start of value of the ordered list to a different value than 1. How can I do that?

This topic has been closed for replies.

1 reply

Bob_Niland
Community Expert
Community Expert
January 10, 2020

Do you have the ability (under DITA) to set the Number > Format in Paragraph Designer?

Here's an entry I'm using in a current project:
Format: N:<n=0>.\t

Although you can use an override to do this (in unstructured FM), I always use dedicated Paragraph tags to do it.

hadih26673991
Inspiring
January 17, 2020

So I have checked it using fm file format. The WYSIWYG is perfect, as the list starts from the value I set o:<n=22>)\t

But in the pdf the list starts from 1 again!

frameexpert
Community Expert
Community Expert
January 23, 2020

Ohh, I got your point:

You can do this in the following way :

Steps:

  1. Open your output template
  2. Create a new paragraph style, I created "ol22.num.begin " with numbering property as "o:<n=22>)\t"
  3. Export its Element catalog i.e EDD (Structure->EDD)
  4. Now go to <li > element and edit its context
  5. Add one more context before "{first}<ol"
  6. Something like " {first}<ol[outputclass=”22”] "
     

     

  7. Now save this Edd and open you output template fm file
  8. Import this element definition into it (File->Import->Element Definition)
  9. Save it and you are good to go for publishing

Let me know how it went for you.

 

 


Of course the problem here is that the 22 is hardcoded. A useful enhancement would be an autonumber building block that would be based on a particular attribute's value. For example:

 

<$attribute-value[outputclass]>

 

or something like that. I would favor enhancements like this over the ability to import CSS into an EDD.