Page 1 of 1

oXygen 14.1: List items in numbered lists not indentent

Posted: Wed Dec 12, 2012 12:23 am
by StefanG
Given the following DITA XML:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic_ll5_n23_n3">
<title>Numbered Lists displayed wrong in oXygen?</title>
<body>
<p>In the following unsorted list (ul), the list items are properly indented:</p>
<ul>
<li>Brevis cantio cito decantatur. Cantat avis quaevis, sicut rostrum sibi crevit.</li>
<li>Brevis cantio cito decantatur. Cantat avis quaevis, sicut rostrum sibi crevit.</li>
<li>Brevis cantio cito decantatur. Cantat avis quaevis, sicut rostrum sibi crevit.</li>
</ul>
<p>In the following ordered list (ol), the list items are NOT properly indented:</p>
<ol>
<li>Brevis cantio cito decantatur. Cantat avis quaevis, sicut rostrum sibi crevit.</li>
<li>Brevis cantio cito decantatur. Cantat avis quaevis, sicut rostrum sibi crevit.</li>
<li>Brevis cantio cito decantatur. Cantat avis quaevis, sicut rostrum sibi crevit.</li>
</ol>
</body>
</topic>
Looks like this in the oXygen Author mode:

Image

As you can see the ul/li look indented as expected but the ol/li are missing the indent for the list items. I have checked the

Code: Select all

/frameworks/dita/css_classed/topic.css
but could not find something that could explain this bug.

Could you please check (and fix) this? Maybe I can hack around this with some CSS tweaking?

Re: oXygen 14.1: List items in numbered lists not indentent

Posted: Wed Dec 12, 2012 12:02 pm
by Radu
Hi Stefan,

In the topic.css you mentioned there are some selectors like:

Code: Select all

*[class~="topic/ol"] > *[class~="topic/li"] {
/* Use list-item instead of block to avoid putting the
sentinels markers of the "ol" and the first "li"
on the same line, in compact tag display.*/
display:list-item;
list-style:none;
}

/* Declare counter on the first list item. */
*[class~="topic/ol"] > *[class~="topic/li"]:first-child {
counter-reset: item-count;
}

/* Increment the counter for list items */
*[class~="topic/ol"] > *[class~="topic/li"] {
counter-increment: item-count;
}

/* Render the counter before the list item content */
*[class~="topic/ol"] > *[class~="topic/li"]:before {
content: counters(item-count, ".", decimal) " ";
font-weight:bold;
}
If you replace them with:

Code: Select all

*[class~="topic/ol"] > *[class~="topic/li"] {
display:list-item;
list-style:decimal;
}
you would have the desired behavior.

But we cannot do this out of the box because this might not be the right thing to do in all cases, details below:

Basically if you have list-style:decimal; on an element, its content will always appear to the right of the counter.
But a DITA list item can make conrefs to another list item (or to a range of other list items). Those referenced list items are shown in place and need to have their counters incremented properly as if they would be in the current document. So we needed to define counters and increment them in order to properly display referenced list items. But if before a list item you have a content: counters(item-count, ".", decimal) " ";, then this counter will be considered in-line with the text body, so the text on the second line will no longer align to be at the right of the counter.

Regards,
Radu