Page 1 of 1

Alignment of page numbers in TOC on the right side. How?

Posted: Thu Dec 29, 2022 2:51 pm
by DAN SEA
Good day everyone!
There was such a question: the standard way to generate a table of contents (at the same time with the document) - generates page numbers that are not aligned on the right side (it would be much more accurate) - I tried to show this in the attached picture.

Is there any way to improve this point?

Thank you in advance!
2.jpg

Re: Alignment of page numbers in TOC on the right side. How?

Posted: Thu Dec 29, 2022 4:20 pm
by chrispitude
Hi Dan,

When I generate a generic pdf-css-html5 PDF with no custom CSS, all the page numbers are properly right-aligned.

If you temporarily remove your CSS, does it publish correctly?

Re: Alignment of page numbers in TOC on the right side. How?

Posted: Fri Dec 30, 2022 10:18 am
by DAN SEA
Hello, Chrispitude!
Yes, just checked - it's only with my Custom CSS! Without him, everything is fine. But I need it to be good with him ... :-)

A small observation where such unaliging occurs: my TOC contains paragraphs with different font sizes and styles. For example:

1.Example (size 14, normal)
1.1. Example (size 10, italic )
1.1.1. Example (size 8, normal )

And all the page numbers of these items are displayed not aligned with each other.

Re: Alignment of page numbers in TOC on the right side. How?

Posted: Tue Jan 03, 2023 4:13 am
by chrispitude
Hi Dan,

I created a testcase with the TOC styles you described, but I can't reproduce the misalignment:

chemistry_deep_toc.zip

Can you share a simple testcase that reproduces the issue, or perhaps modify the testcase above to reproduce it?

- Chris