Nested ordered list numbering scheme
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 5
- Joined: Tue May 21, 2013 2:06 pm
Nested ordered list numbering scheme
Post by miodrag.stankovic »
Hi,
when using the nested ordered list
<ol>
<li>Introduction
<ol>
<li>Purpose
...
the author output would look something like this:
1. Introduction
1.1. Purpose
and when I generate the PDF it yields
1. Introduction
1.a Purpose
How can the PDF or XHTML generator be influenced to use numbers for nested items as well?
Cheers,
Mile
when using the nested ordered list
<ol>
<li>Introduction
<ol>
<li>Purpose
...
the author output would look something like this:
1. Introduction
1.1. Purpose
and when I generate the PDF it yields
1. Introduction
1.a Purpose
How can the PDF or XHTML generator be influenced to use numbers for nested items as well?
Cheers,
Mile
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Nested ordered list numbering scheme
Post by sorin_ristache »
Hi Mile,
What Oxygen version do you use? I inserted two nested ordered lists in a DITA topic in Oxygen 14.2 and I get the same numbering style in both the PDF output and the Webhelp one using the built-in transforms (DITA Map PDF and DITA Map WebHelp), which means only the default values for all transform parameters:
Regards,
Sorin
What Oxygen version do you use? I inserted two nested ordered lists in a DITA topic in Oxygen 14.2 and I get the same numbering style in both the PDF output and the Webhelp one using the built-in transforms (DITA Map PDF and DITA Map WebHelp), which means only the default values for all transform parameters:
Code: Select all
1. Item 1
a. item 1.1
b. item 1.2
2. Item 2
a. item 2.1
b. item 2.2
Regards,
Sorin
-
- Posts: 5
- Joined: Tue May 21, 2013 2:06 pm
Re: Nested ordered list numbering scheme
Post by miodrag.stankovic »
Hi Sorin,
I've made a small mistake. So, it's like this in the Author view:
1. Introduction
1.1. Purpose
and when I generate the PDF it yields ACTUALLY this
1. Introduction
a. Purpose
I used "DITA Map PDF" and Oxygen XML Editor Professional 14.2.
Cheers,
Mile
I've made a small mistake. So, it's like this in the Author view:
1. Introduction
1.1. Purpose
and when I generate the PDF it yields ACTUALLY this
1. Introduction
a. Purpose
I used "DITA Map PDF" and Oxygen XML Editor Professional 14.2.
Cheers,
Mile
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Nested ordered list numbering scheme
Post by sorin_ristache »
Hi Mile,
Alternatively you can add a new CSS for editing DITA topics in the DITA frameworks which sets a different numbering style for list items, from menu Options -> Preferences -> Document Type Association -- DITA -- the Edit button -- the Author tab -- the CSS subtab. Setting an alternative CSS for editing in Author mode is explained also in the User Manual.
Regards,
Sorin
This is the default list numbering style in the Author editing mode and is set in the topic.css stylesheet which is associated by default by the DITA framework with all DITA topic files. The default output style (1.a instead of 1.1) comes from the DITA-OT toolkit and we did not change/customize it. You can modify the default numbering style in the topic.sss stylesheet, line 268, for example change the decimal style to lower-latin as below:miodrag.stankovic wrote:So, it's like this in the Author view:
1. Introduction
1.1. Purpose
Code: Select all
/* Render the counter before the list item content */
*[class~="topic/ol"] > *[class~="topic/li"]:before {
content: counters(item-count, ".", lower-latin) ". ";
font-weight:bold;
}
Regards,
Sorin
-
- Posts: 5
- Joined: Tue May 21, 2013 2:06 pm
Re: Nested ordered list numbering scheme
Post by miodrag.stankovic »
Hi Sorin,
thanks for the answer.
So, my problem boils down to modifying the DITA-OT toolkit .css, because I want it to behave the same as the default in the authoring mode, i.e. with numbers all the way. I've found a couple of .css files that relate to that in /...somewhere.../DITA-OT/css but couldn't find my way through them
Any idea?
Cheers,
Mile
thanks for the answer.
So, my problem boils down to modifying the DITA-OT toolkit .css, because I want it to behave the same as the default in the authoring mode, i.e. with numbers all the way. I've found a couple of .css files that relate to that in /...somewhere.../DITA-OT/css but couldn't find my way through them

Cheers,
Mile
-
- Posts: 5
- Joined: Tue May 21, 2013 2:06 pm
Re: Nested ordered list numbering scheme
Post by miodrag.stankovic »
I tried to substitute all the occurrences of 'lower-alpha' to 'decimal' in DITA-OT .css files, but I still don't have the desired PDF or WebHelp output. The thing is, I'm currently writing a software requirements specification, and it mandates the use of numbers all the way through sections, sub-sections, sub-sub-sections etc.
Cheers,
Mile
Cheers,
Mile
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Nested ordered list numbering scheme
Post by sorin_ristache »
Hi Mile,
For the Webhelp transformation you have to set the list style in the CSS stylesheet [Oxygen-install-dir]\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\oxygen-webhelp\resources\css\webhelp_topic.css by adding a new CSS selector as below:
For the PDF transformation you have to customize or modify the following template from the XSLT stylesheet [Oxygen-install-dir]\frameworks\dita\DITA-OT\plugins\org.dita.pdf2\xsl\fo\lists.xsl, where the list item label is created (look at the <number> element):
Regards,
Sorin
For the Webhelp transformation you have to set the list style in the CSS stylesheet [Oxygen-install-dir]\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\oxygen-webhelp\resources\css\webhelp_topic.css by adding a new CSS selector as below:
Code: Select all
ol {
list-style-type: decimal;
}
Code: Select all
<xsl:template match="*[contains(@class, ' topic/ol ')]/*[contains(@class, ' topic/li ')]">
Regards,
Sorin
-
- Posts: 5
- Joined: Tue May 21, 2013 2:06 pm
Re: Nested ordered list numbering scheme
Post by miodrag.stankovic »
Thanks a million Sorin, I've tried it and it works. It would be perfect though, if the output would be just like the one in the Author mode, i.e. where all the <li> items would have the complete number tracking history contained in their number:
1. Features
1.1. Feature...
1.2. Feature...
1.2.1. Sub-feature...
I realize that this has now to do with xslt (xsl::number, counter(...) etc.) and not Oxygen, but any help/hint/pointer would be appreciated.
Cheers,
Mile
1. Features
1.1. Feature...
1.2. Feature...
1.2.1. Sub-feature...
I realize that this has now to do with xslt (xsl::number, counter(...) etc.) and not Oxygen, but any help/hint/pointer would be appreciated.
Cheers,
Mile
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service