Here are the steps for writing a table of contents in LibreOffice
1. Open a new LibreOffice document
2. Double click on the ruler, it will appear "L" on the ruler along with this dialog box. Click "Ok"
3. Select the “Tabs” tab. Make sure the Type is "Left". Then select "Fill Character" in the form of a dotted line and save the settings
4. Write the name of the chapter to be included in the table of contents. Press the "Tab" key on the keyboard then a dotted line will automatically appear, at the end of the line, fill in the page number.
4. Write the name of the chapter to be included in the table of contents. Press the "Tab" key on the keyboard then a dotted line will automatically appear, at the end of the line, fill in the page number.
5. To create a new line, simply press the "Enter" key on the keyboard and do the same thing as in point 3, do as many chapters as there are. In order to write neatly, it is enough to adjust the rulersumber