How to skip chapter number for the first topic?

Post here questions and problems related to editing and publishing DITA content.
DmitryS
Posts: 26
Joined: Wed Nov 27, 2019 11:03 am

How to skip chapter number for the first topic?

Post by DmitryS »

Hi Team!
Some document standards wants me to place introductory topics before TOC, an these topics have to have no number:

Code: Select all

    <chapter href="32-01_installation_ug/concept/c_annotation.dita" outputclass="before-toc"/>
    <chapter href="32-01_installation_ug/concept/c_abbreviations.dita" outputclass="before-toc"/>
    <chapter href="32-01_installation_ug/concept/c_general_info.dita">
        <topicref href="32-01_installation_ug/concept/c_architecture.dita"/>
        <topicref href="32-01_installation_ug/concept/c_environment_structure.dita"/>
    </chapter>
I cannot find how to start third topic, "c_general_info.dita" with 1. My template is based on CSS, I use deep numbering style.
julien_lacour
Posts: 483
Joined: Wed Oct 16, 2019 3:47 pm

Re: How to skip chapter number for the first topic?

Post by julien_lacour »

Hello,

You can do this using the following selector in your CSS customization:

Code: Select all

*[class ~= "map/map"][numbering^='deep'] *[class ~= "topic/topic"][outputclass="before-toc"] + *:not([outputclass="before-toc"]) {
    counter-reset: chapter;
}
Please note that you can debug your customization using the transformation ".merged.html" generated file.
Using this and your browser inspector you can easily identify and modify the selectors to customize the output.

Regards,
Julien
DmitryS
Posts: 26
Joined: Wed Nov 27, 2019 11:03 am

Re: How to skip chapter number for the first topic?

Post by DmitryS »

Unfortunately, it doesn't help.
julien_lacour
Posts: 483
Joined: Wed Oct 16, 2019 3:47 pm

Re: How to skip chapter number for the first topic?

Post by julien_lacour »

Hello,

Could you give us a small sample in which the issue appears?
Like this we can analyze where is the problem and fix it.

Regards,
Julien
DmitryS
Posts: 26
Joined: Wed Nov 27, 2019 11:03 am

Re: How to skip chapter number for the first topic?

Post by DmitryS »

Hello Julien,
example is attached.
(I hope to remove the chapter number for Appendix with your solution. I don't need it as well)

Sincerely,
Dmitry
example.zip
(11.69 KiB) Downloaded 204 times
julien_lacour
Posts: 483
Joined: Wed Oct 16, 2019 3:47 pm

Re: How to skip chapter number for the first topic?

Post by julien_lacour »

Hello Dmitry,

I've updated your CSS files on my side and tested successfully.

Please check if this works also on your version:
CSS.zip
(4.88 KiB) Downloaded 266 times
Regards,
Julien
DmitryS
Posts: 26
Joined: Wed Nov 27, 2019 11:03 am

Re: How to skip chapter number for the first topic?

Post by DmitryS »

Hello Julien,
no result again... It looks like custom CSS is ignored. Maybe merged.html can help? I have attached it.
b_32-01_installation_ug.zip
(80.68 KiB) Downloaded 205 times
Thanks,
Dmitry
julien_lacour
Posts: 483
Joined: Wed Oct 16, 2019 3:47 pm

Re: How to skip chapter number for the first topic?

Post by julien_lacour »

Hello again,

Could you write us an email at support@oxygenxml.com. I can give you a snapshot of a more recent version of the Oxygen DITA-OT CSS Publishing plugin. Normally it should correct the numbering behavior.

Regards,
Julien
Post Reply