How to skip chapter number for the first topic?

DmitryS
Posts: 8
Joined: Wed Nov 27, 2019 11:03 am

How to skip chapter number for the first topic?

Post by DmitryS » Thu Nov 28, 2019 4:40 pm

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: 16
Joined: Wed Oct 16, 2019 3:47 pm

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

Post by julien_lacour » Mon Dec 02, 2019 1:29 pm

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: 8
Joined: Wed Nov 27, 2019 11:03 am

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

Post by DmitryS » Mon Dec 02, 2019 3:55 pm

Unfortunately, it doesn't help.

julien_lacour
Posts: 16
Joined: Wed Oct 16, 2019 3:47 pm

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

Post by julien_lacour » Tue Dec 03, 2019 1:42 pm

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: 8
Joined: Wed Nov 27, 2019 11:03 am

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

Post by DmitryS » Tue Dec 03, 2019 2:29 pm

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 2 times

julien_lacour
Posts: 16
Joined: Wed Oct 16, 2019 3:47 pm

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

Post by julien_lacour » Wed Dec 04, 2019 11:08 am

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 3 times
Regards,
Julien

DmitryS
Posts: 8
Joined: Wed Nov 27, 2019 11:03 am

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

Post by DmitryS » Wed Dec 04, 2019 12:35 pm

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 1 time
Thanks,
Dmitry

julien_lacour
Posts: 16
Joined: Wed Oct 16, 2019 3:47 pm

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

Post by julien_lacour » Wed Dec 04, 2019 5:58 pm

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