Numbering problems

Stanislav
Posts: 10
Joined: Thu Aug 30, 2018 7:25 pm

Numbering problems

Post by Stanislav » Wed Nov 28, 2018 9:24 pm

Hi. There is a small question. I try to build numbering in the document, using p-optional-numbering-deep.css file and tips from the site for some help. But at the same time I get this thing.
Image мягкая мебель

What is wrong here: the first Chapter does not reset the counter and the count of pages goes from the title page. When I fix this thing, it turns out this thing:
Image upload image

It is clear that the counter for sections is not reset. It turns out either the numbering is not from the first Chapter, or the lack of numbering for the sections.
Really need help for broke the entire brain.
Thanks

Dan
Posts: 403
Joined: Mon Feb 03, 2003 10:56 am

Re: Numbering problems

Post by Dan » Thu Nov 29, 2018 10:36 am

Hello Stanislav,

I think a counter-reset used to reset the page on the first chapter has overwritten other counter-reset properties that reset other counters as well. (The counter-reset property can affect multiple counters at once.)

If you cannot detect the problem, please send us your CSS using the Technical Support form:
https://www.oxygenxml.com/techSupport.html

Many regards,
Dan

Stanislav
Posts: 10
Joined: Thu Aug 30, 2018 7:25 pm

Re: Numbering problems

Post by Stanislav » Thu Nov 29, 2018 11:46 am

Hello Dan!
For testing, I use an example IT-Book map from the catalog ../data / it-book and as a test file I use css file p-optional-numbering-deep.css.
Even under such default parameters, the numbering of the first Chapter does not begin with the number 1.
If i use the p-numbering-shadow.css file, the numbering of the first Chapter is ok, but the numbering of sections is lost.

Dan
Posts: 403
Joined: Mon Feb 03, 2003 10:56 am

Re: Numbering problems

Post by Dan » Thu Nov 29, 2018 12:01 pm

I see that the numbering of the chapter starts with 1. Do you refer to the page number of the first chapter?
From your message I understood that you have succeeded in resetting the page, but the sub-sections numbers were wrong (after the fix). Is this correct?

Stanislav
Posts: 10
Joined: Thu Aug 30, 2018 7:25 pm

Re: Numbering problems

Post by Stanislav » Thu Nov 29, 2018 12:11 pm

Here is what happens when numbering in this example
Image

Dan
Posts: 403
Joined: Mon Feb 03, 2003 10:56 am

Re: Numbering problems

Post by Dan » Thu Nov 29, 2018 12:19 pm

To reset the page on the first chapter, please add this to the customization CSS:

Code: Select all


*[class ~= "map/map"] > *[class ~= "placeholder/toc"] + *[class ~= "topic/topic"][is-chapter]:not([is-part]) {
counter-reset: page section1;
}
So it will reset both the page and the section counters.

Let me know if it worked for you,
Many regards,
Dan

Stanislav
Posts: 10
Joined: Thu Aug 30, 2018 7:25 pm

Re: Numbering problems

Post by Stanislav » Thu Nov 29, 2018 12:39 pm

Yep, it's working.
Thanks Dan. I spended 2 days for resolve this issue.
And there is so simple solution - ''counter-reset: page section1;"
Need more knowledge for me )

Dan,could you spare a moment? I need some help (again), please.
In the screenshot marked the places where the distance after the dotes to thepage numbers is not always the same.
Are there any methods to control this space. Especially considering that links to pages can consist of three digits or more.
Image

Dan
Posts: 403
Joined: Mon Feb 03, 2003 10:56 am

Re: Numbering problems

Post by Dan » Thu Nov 29, 2018 1:24 pm

The layout engine figures out how many dots are entering in the leader that links the text to the numbers. The text width of the titles seem to vary a bit and sometimes the dot does not fit. Unfortunately there is no setting to control that..

All the best,
Dan

Stanislav
Posts: 10
Joined: Thu Aug 30, 2018 7:25 pm

Re: Numbering problems

Post by Stanislav » Thu Nov 29, 2018 1:28 pm

it's a sad that so of course, but still, thank you very much!

Manohar_1024
Posts: 34
Joined: Wed Mar 27, 2019 10:12 am

Re: Numbering problems

Post by Manohar_1024 » Thu Mar 28, 2019 3:25 pm

Hello Dan,
Yes, i am facing this issue.i am able reset the page number after each chapter but after the deep numbering is getting effected
Means it coming continuously like 1.1 ,1.2 ,1.3 ,2.4 ,2.5 ,2.6.....but actually it should be 1.1, 1.2 ,1.3, 2.1, 2.2 ,2.3....
Dan wrote:
Thu Nov 29, 2018 12:01 pm
I see that the numbering of the chapter starts with 1. Do you refer to the page number of the first chapter?
From your message I understood that you have succeeded in resetting the page, but the sub-sections numbers were wrong (after the fix). Is this correct?

Costin
Posts: 600
Joined: Mon Dec 05, 2011 6:04 pm

Re: Numbering problems

Post by Costin » Mon Apr 01, 2019 10:56 am

According to the other post of yours on a different forum thread I guess my solution helped and you managed to obtain what you wanted.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support

Post Reply