It seems you only have two options for page numbers, right aligned, in which case page numbers run down the right margin, or not right aligned, in case they sit right beside the Heading. Neither of these works well visually, the gap from left to right is too wide to make it immediately obvious how the heading and page number align. Likewise the non-aligned leaves no clear column for page numbers, and its hard to run your eye down them.
I tried creating a right indent for the TOC entry paragraph style, to bring the page number closer to the TOC entry. It doesn't get applied. A left indent gets applied, and it does reduce the distance from the TOC entry to the page number, but it leaves an odd-looking page. I tried playing with a margins setting for just the TOC pages, but it doesn't seem to get applied, and even if it worked, that would be a nuisance if the TOC gets altered to produce more or fewer entries, e.g. when creating a space below each entry for ease of reading or, as a current document works, where the TOC covers two pages, almost but not quite filling the second - any new entries will result in a page break.
What it really needs is a 'page numbers' dialog, as with the present 'Entries' button. Then you can specify the spacing with tabs or an absolute distance. Workarounds don't really cut it when the TOC is liable to change as the document develops.
Table of contents formatting
Re: Table of contents formatting
It gets applied. But the width of the tab characters between the heading titles and the page numbers is controlled not by the paragraph’s right margin but by the corresponding tab stop within the “TOC N” styles:I tried creating a right indent for the TOC entry paragraph style, to bring the page number closer to the TOC entry. It doesn't get applied.
You can change the tab stop value within the properties of the corresponding TOC style: