Setting the Table of Contents Style

How do I set the style for the table of contents or table index as in the image below? The expected result will be something like “Using MS W*rd”. And the experiment I did with LibreOffice Writer gave results like the image below.

This requires customisation of the various Contents n paragraph styles.

Unfortunately, any tab stop set beyond the right indent is ignored when setting text. I.e., it kinds of “bounces” against the right indent and restarts on the next line.

For my information, how is it configured in M$ Word?

I have tried changing the paragraph style settings used, as in this answer and managed to align the left side.

Regarding the M$ Word information you asked for, I’m sorry I can’t provide it because the example in the image is just a screenshot that I took from a PDF exported from M$ Word.

I tried various tricks to send page number inside the right margin to no avail. This failure is consistent with the Writer layout model. I know this a traditional TOC layout but it can’t be done presently.


EDIT 2023-10-25

I filed enhancement request tdf#157914.

Thank you for the help. For the time being I will avoid using long captions that will be included in the table of contents.

Alas, the only sensible workaround seems to be to untick “protect from manual change” and insert linefeeds manually as desired. This kind of edit will vanish whenever the ToC is refreshed, so it is only useable as the “finishing touch”.

It is also possible to build a ToC manually by inserting reference fields, one by one, into a table structure. A lot of manual work on a long document, and with this it is probably very difficult to achieve a decent looking dotted leader line. May make sense for some settings. The obvious disadvantage is that you have to create each ToC entry manually to correspond to each chapter/section/subsection. The advantage is that it keeps the layout across updates.

ToC_typografi.odt (17.0 KB)

Thank you for your solution. I will consider it.