Table of Contents - 'align right' ignores the page margin

I’m trying to create a table of contents, and it’s nice and dandy otherwise, but the page numbers, aligned right, are not stopping at the page margin but at the actual page edge instead.

I hope this picture helps you get the idea:

What could cause this? The only way I’ve found to solve this is to manually drag each and every page number to the correct position, but these changes reset every time I update the table.

I’m using Windows 8.1 Pro x64, LibreOffice 4.1.4.2, and the file is in ODT format. I noticed a similar weirdness when I changed the font size of the Contents 1 style - it changes to other sizes correctly, but size 12 is not “working”, it keeps the previous size although the value changes.

Please edit your question to indicate your operating system, LO version, and file format (ODT, DOC, DOCX).

What is the tab setting for the Contents 1 paragraph style? Is this equal to the right margin position or is it a larger value? You can edit this value:

  • Format > Styles and Formatting (F11).
  • Ensure All Styles is selected in the pull-down option at the bottom of this dialog.
  • Right-click on the Contents 1 entry > Modify… > Tabs tab > adjust tab settings as required > click OK.

EDIT: Here (rename from JPG to ODT) is a sample file using the default ToC settings in v4.1.4.2 under GNU/Linux. Download it and have a look to see if it displays OK or differently on your system.

@oweng Yes, the tab setting seems to be correct (15,00 cm, right align). Although, it seems to do absolutely nothing when I change the values. Same thing with the other “Contents *” styles.

Thanks for confirming. I have added a sample file for you to examine. I can’t reproduce the issue here.