ToC Not Working

Hi, newbee to this forum and to LO.

I have a fairly long document on GoogleDocs and have decided to transfer it to a local drive. I downloaded it from GD in both .odt and .docx format. Apart from a few minor issues, it seems to have transferred pretty well. However, when I come to insert a ToC I get nothing. I have many headers (up to 5 levels) and all are recognised as headers in the style box. (I’ve even tried adding a new title and selecting it as a title.) However, when I try to create a ToC there is nothing produced except the ToC title. I tried creating a test document and inserted several dummy headers. This worked fine - the ToC was created fine. Is there something within the GoogleDocs download file that might somehow (deliberately or not) disable ToC creation or mess around with the header settings to prevent LO from correctly seeing them as headers in the ToC?

I have LO v 6.4.7.2 (I believe there might be a minor update, but I don’t yet want to go to v7) and running on Win10.

Matt

You probably mean headings styled as Heading n. Headers are quite a different thing. A heading is what is repeated at top of every page and styled Header or variants. Only Heading n will be recognised when collecting TOC.

I kind of remember a recent question about GoogleDocs messing up files. Unless other contributors provide the reference to the question (and its possible solution), I’m afraid you must import as plain text in a blank document and restyle it (you practice styles, don’t you? This is the only fast way to reformat without pain a document).

You’re absolutely correct in that I meant heading not header. The headings that I have in place are recognised as heading 1, heading 2, etc. in the styles box as they are when I created a test doc, which worked. Even if I remove the original heading completely and/or create a completely new one as a ‘heading 1’, it still does not work. Obviously I don’t want to have to redo this article from scratch or even go through it from an unformatted ‘copy and paste’ form. I have even just tried downloading the file as an RTF with the same result.

Unfortunately this is not a solution. Please use the more link under this “non-answer” to “Repost as a comment”. Otherwise contributors will see on the home page that this question already has an answer and might not be tempted to provide one.

Sorry. not used to this type of forum routine.

Make sure that in Tools - Chapter numbering, the Level 1, 2 etc are linked to Heading 1, Heading 2 etc. paragraph styles, or the TOC will remain empty.

1 Like

Thanks, floris v. This works.

(Just for clarification for anyone else who is as new to LibreOffice or Table-of-Contents as me - as I have to admit, it took several minutes to work out how to proceed - this change is through ‘Tools’ - ‘Chapter numbering’ - the ‘Numbering’ tab - select the level and then select the appropriate heading style from the drop down in the ‘Paragraph style’ dropdown list. Simple when you know how - thanks again, floris v)