In index loosing pagenr when formatted as 2 columns

Env: MacOS 10.15.7 Catalina, LO 7.0.4.2

I have a standard “table of contents”. This is fine with the chapter nr, chapter descr, dots, pagenumber.
If I format this in 2 columns for all chapters the pagenumber is missing. Also for some entries the filling dots run over to the next line.

I looked in formatting but the tab “T” is set to automtically right align. That doesn’t happen. Manually setting a width does not seem to work, both in full page as in 2 columns.

I also tried to get rid of the dots by setting the character to space, but that didn’t work either.

I tried several times to completely delete the table of contents, and recreating it, but no success.
Am I doing something wrong here?

I didn’t find a comprehensive guide as top how this all is supposed to work.

Any help appreciated.

EDIT by ajlittoz transfer of sample file from an answer to the question

TestFile.docx

Since it should work with these settings, attach a short sample file to your question. For that, edit the question, set the cursor at end of it, press twice Enter and use the “paperclip” tool.

I deleted your “non answer” as it is not a solution to your problem. I transferred the attached sample file into the question.

The edit link is there for you to change/edit/augment/improve your question until it is self-contained and satisfactory.

I started to analyse your file. There are several issues:

  • it is a .docx file which causes several compatibility issues
  • there are sections which have no intrinsic justification
  • when I open it, I get "install the Dutch hyphenation package which might be an indication that the file transited by Google Docs some time in the past
  • Tools>Chapter Numbering is damaged as there is no paragraph style associated to levels 1-5
  • the TOC engine does not do its job correctly because sometimes even in 1-column it extends beyond the right margin
  • when switched to 2-column, the right-aligned tab remains at on the page right margin instead of shifting to column limit
  • Heading 1 paragraphs which are at outline level 1 end up at level 2 in TOC (formatted with Contents 2) , same for Heading 2Contents 3, though the definition of the TOC is OK
  • there are double LS and LE markers in the TOC structure lines (this shouldn’t matter, but it is strange)

During its life, your file probably was handled by several applications, each adding its incompatibility factor into it. Looking at the XML, I was unable to find where it was subtly corrupted.

I’d suggest you save it .txt and import it into a fresh .odt file. Revise your styling. Too many paragraphs are Default Paragraph Style. Your lists and chapters are manually numbered while they could be so automatically.

The Footer paragraph style has been messed up. The Factory setting are such that you can have some text at left, then a tab, a text centered, than a tab and a right-aligned text on the the right margin. You have a chaos of consecutive tabs which don’t even align the page number at right.

You abuse tabs to indent your text instead of using para style indents. For example, there is no need to define a tab stop on left para indent for hanging alinea because indent implicitly defines a tab stop. This is more reliable because you need not adjust the tab with the indent

Generally I use the default setting LO. I confirmed that before I received the file as .docx the file has been converted from a .pdf file.
I’ll go with your suggestion to save as .txt and start formatting the proper way.
I’ll report on that later, but it will take some time (the document is 37 pages long).

Thanks for investigating…

P.S. Does Libreoffice have some ‘cleanup nfunction’. E.g. to make all header 1 the same format? The same for all list items, etc.