I'm working with DITA content that has lots of nested lists and those lists use custom numbering styles, as well as the occasional numbering reset (handled by setting the "start" attribute in HTML). I'm able to handle this fine in HTML and PDF output .. but it would be nice to also show all of this in the Author view in Oxygen. I'm good with the numbering styles, but the numbering reset (start) isn't going well. As far as I can tell, the "right" way to deal with this is to use the counter-reset and counter-increment CSS properties and to use the counter function in a content property (li:before). I can get this to work to some degree, but it's absurdly complicated, since you're no longer relying on the native numbering (style and incrementing) .. you have to recreate this for all possible cases. If there was a CSS "start" property, this would just work .. no? Yes. I know that "start" is a hack and was booted from HTML4 .. but it's back in HTML5. Yes. I know that in a perfect world, the start attribute shouldn't be needed .. but in reality, it is. I'm setting this in DITA as .. ol/@outputclass='start(n)' .. it's all "good" except that I can't get this to render in Oxygen. Is there some special Oxy-function that I'm missing? Any thoughts on how to address this? Thanks! Scott
|*<ol* outputclass="start-3"*>*| But they did not make changes in the Oxygen Author visual page's CSS
Hi Scott, I see my colleagues from the WebHelp and CSS-based PDF publishing have worked to implement out of the box in our WebHelp and PDF publishing DITA OT plugins a construct like this for Oxygen 28: stylesheets. I concur that using regular CSS this is quite hard to accomplish visually in the Author visual editor mode, you would need to re-write counters and so on, take conrefs, conref ranges into account. How about if you add a simple CSS selector like to the CSSs used to edit the DITA XML topic in the Author mode?
ol[outputclass^="start("]:before { display:block; content: "[Starts in " oxy_replace(oxy_replace(attr(outputclass), "start(", ""), ')', "") "]"; color:red; }
At least this will show the writer that the start number has been set on the ol. https://blog.oxygenxml.com/topics/customizeDITACSS.html Regards, Radu Radu Coravu Oxygen XML Editor On 11/2/25 04:25, Scott Prentice wrote:
I'm working with DITA content that has lots of nested lists and those lists use custom numbering styles, as well as the occasional numbering reset (handled by setting the "start" attribute in HTML). I'm able to handle this fine in HTML and PDF output .. but it would be nice to also show all of this in the Author view in Oxygen. I'm good with the numbering styles, but the numbering reset (start) isn't going well.
As far as I can tell, the "right" way to deal with this is to use the counter-reset and counter-increment CSS properties and to use the counter function in a content property (li:before). I can get this to work to some degree, but it's absurdly complicated, since you're no longer relying on the native numbering (style and incrementing) .. you have to recreate this for all possible cases.
If there was a CSS "start" property, this would just work .. no?
Yes. I know that "start" is a hack and was booted from HTML4 .. but it's back in HTML5. Yes. I know that in a perfect world, the start attribute shouldn't be needed .. but in reality, it is. I'm setting this in DITA as .. ol/@outputclass='start(n)' .. it's all "good" except that I can't get this to render in Oxygen.
Is there some special Oxy-function that I'm missing? Any thoughts on how to address this?
Thanks!
Scott
_______________________________________________ oXygen-user mailing list --oxygen-user@oxygenxml.com To unsubscribe send an email tooxygen-user-leave@oxygenxml.com
And a possible variant with counter-reset:
*[class~="topic/ol"][outputclass ^= "start("] { counter-reset: item-count oxy_subtract(oxy_substring(attr(outputclass), 6), 1, integer); } but it was not tested for all possible cases.
Regards, Radu Radu Coravu Oxygen XML Editor On 11/3/25 11:06, Oxygen XML Editor Support (Radu Coravu) wrote:
Hi Scott,
I see my colleagues from the WebHelp and CSS-based PDF publishing have worked to implement out of the box in our WebHelp and PDF publishing DITA OT plugins a construct like this for Oxygen 28:
|*<ol* outputclass="start-3"*>*| But they did not make changes in the Oxygen Author visual page's CSS stylesheets. I concur that using regular CSS this is quite hard to accomplish visually in the Author visual editor mode, you would need to re-write counters and so on, take conrefs, conref ranges into account.
How about if you add a simple CSS selector like to the CSSs used to edit the DITA XML topic in the Author mode?
ol[outputclass^="start("]:before { display:block; content: "[Starts in " oxy_replace(oxy_replace(attr(outputclass), "start(", ""), ')', "") "]"; color:red; }
At least this will show the writer that the start number has been set on the ol.
https://blog.oxygenxml.com/topics/customizeDITACSS.html
Regards,
Radu
Radu Coravu Oxygen XML Editor
On 11/2/25 04:25, Scott Prentice wrote:
I'm working with DITA content that has lots of nested lists and those lists use custom numbering styles, as well as the occasional numbering reset (handled by setting the "start" attribute in HTML). I'm able to handle this fine in HTML and PDF output .. but it would be nice to also show all of this in the Author view in Oxygen. I'm good with the numbering styles, but the numbering reset (start) isn't going well.
As far as I can tell, the "right" way to deal with this is to use the counter-reset and counter-increment CSS properties and to use the counter function in a content property (li:before). I can get this to work to some degree, but it's absurdly complicated, since you're no longer relying on the native numbering (style and incrementing) .. you have to recreate this for all possible cases.
If there was a CSS "start" property, this would just work .. no?
Yes. I know that "start" is a hack and was booted from HTML4 .. but it's back in HTML5. Yes. I know that in a perfect world, the start attribute shouldn't be needed .. but in reality, it is. I'm setting this in DITA as .. ol/@outputclass='start(n)' .. it's all "good" except that I can't get this to render in Oxygen.
Is there some special Oxy-function that I'm missing? Any thoughts on how to address this?
Thanks!
Scott
_______________________________________________ oXygen-user mailing list --oxygen-user@oxygenxml.com To unsubscribe send an email tooxygen-user-leave@oxygenxml.com
Hi Radu, Thanks. Yes, I'll probably just do as you're suggesting and add some type of flag so the writer can see that the start value has been set, but not try to render the numbering. The whole "counter" feature in CSS seems very poorly thought out to me. Massively complicated, for something so seemingly simple, just to avoid supporting a "start" property? Seems like a classic case of over-engineering to me. All the best, Scott On 11/3/25 2:34 AM, Oxygen XML Editor Support (Radu Coravu) wrote:
And a possible variant with counter-reset:
*[class~="topic/ol"][outputclass ^= "start("] { counter-reset: item-count oxy_subtract(oxy_substring(attr(outputclass), 6), 1, integer); } but it was not tested for all possible cases.
Regards,
Radu
Radu Coravu Oxygen XML Editor
On 11/3/25 11:06, Oxygen XML Editor Support (Radu Coravu) wrote:
Hi Scott,
I see my colleagues from the WebHelp and CSS-based PDF publishing have worked to implement out of the box in our WebHelp and PDF publishing DITA OT plugins a construct like this for Oxygen 28:
|*<ol* outputclass="start-3"*>*| But they did not make changes in the Oxygen Author visual page's CSS stylesheets. I concur that using regular CSS this is quite hard to accomplish visually in the Author visual editor mode, you would need to re-write counters and so on, take conrefs, conref ranges into account.
How about if you add a simple CSS selector like to the CSSs used to edit the DITA XML topic in the Author mode?
ol[outputclass^="start("]:before { display:block; content: "[Starts in " oxy_replace(oxy_replace(attr(outputclass), "start(", ""), ')', "") "]"; color:red; }
At least this will show the writer that the start number has been set on the ol.
https://blog.oxygenxml.com/topics/customizeDITACSS.html
Regards,
Radu
Radu Coravu Oxygen XML Editor
On 11/2/25 04:25, Scott Prentice wrote:
I'm working with DITA content that has lots of nested lists and those lists use custom numbering styles, as well as the occasional numbering reset (handled by setting the "start" attribute in HTML). I'm able to handle this fine in HTML and PDF output .. but it would be nice to also show all of this in the Author view in Oxygen. I'm good with the numbering styles, but the numbering reset (start) isn't going well.
As far as I can tell, the "right" way to deal with this is to use the counter-reset and counter-increment CSS properties and to use the counter function in a content property (li:before). I can get this to work to some degree, but it's absurdly complicated, since you're no longer relying on the native numbering (style and incrementing) .. you have to recreate this for all possible cases.
If there was a CSS "start" property, this would just work .. no?
Yes. I know that "start" is a hack and was booted from HTML4 .. but it's back in HTML5. Yes. I know that in a perfect world, the start attribute shouldn't be needed .. but in reality, it is. I'm setting this in DITA as .. ol/@outputclass='start(n)' .. it's all "good" except that I can't get this to render in Oxygen.
Is there some special Oxy-function that I'm missing? Any thoughts on how to address this?
Thanks!
Scott
_______________________________________________ oXygen-user mailing list --oxygen-user@oxygenxml.com To unsubscribe send an email tooxygen-user-leave@oxygenxml.com
_______________________________________________ oXygen-user mailing list --oxygen-user@oxygenxml.com To unsubscribe send an email tooxygen-user-leave@oxygenxml.com
participants (2)
-
Oxygen XML Editor Support (Radu Coravu) -
Scott Prentice