Table of contents: Can I hide Heading 2,3... until clicking on some Heading 1?

I have an .odt file with 1000 pages and a table of contents consisting of hundreds of items. The table of contents is long. Can I arrange it so that I would automatically see only “headings of level 1”, and only after clicking on some of these headings, the other levels of headings would become visible?

Thank you.

A TOC is intended as an index for the reader of a printed book. Since printed material is fixed, frozen, it does not make sense to collapse or expand a level (printed paper cannot change).


What you a re looking for is some navigation tool inside your document. Open the side pane. You access it with View>Sidebar or Ctrl+F5. Click on the “compass” icon to access the Navigator.

The first item in the Navigator list is Headings.

Provided your chapter headings and other divisions are style Heading n (which is probably the case because you could build a TOC), these headings are displayed there. Whenever a heading is the head of other subdivision, its contents is preceded by a small rotating triangular icon (or boxed +). Click on this icon to expand or collapse the level.

  1. (Optional) Right-click on Headings and Collapse All to close all headings
  2. Right-click again and Show Up to Outline Level>nn to filter how much you want to see
  3. Right-click and Expand All

You can do it individually on each heading to control what is “beneath” it, thus showing different level of details in chapters.

To navigate quickly in your document, double-click on a heading to send the cursor there.

PS: whan asking here, always mention OS name, LO version and save format, due to subtle differences between platforms and possibilities in formats.

Thank you for your advice. I tried and found the navigator to be practical. The problem I have is as follows: there are more tables within my .odt file. I often work with the table of contents and frequently copy rows from one place to another. In the navigator, I choose ‘headings’ and select what I need (by double-clicking on a heading), which takes me to the respective heading. However, if I then click on some row ABOVE the selected heading (my file consists of many tables), the navigator switches to ‘tables’ (even if the heading and the row are parts of the same table). If I want to work with ‘headings’ again, I have to scroll. Since I’m used to work with the table of contents a lot, this would be annoying. Is there a way to prevent this - can I ensure that the navigator remains at the heading I last clicked on? Thank you.

(Win10 X 86_64, LO 24.8.4.2, .odt)

Unfortunately, no. The Navigator highlights the object the cursor is in. Consequently if you move from heading to a table, images, note, … Navigator highlighting will also jump to the “new” object.

You mention “tables”. Are these other (partial/chapter) TOCs? Or are they “common” tables made of cells arranged in rows and columns?

If you have no semantic reason to use tables (i.e. your data is not tabular by nature or you need no parallel sub-documents – this is what a Writer table cell is: just another text document nested into the main one), avoid them. Having many tables puts a considerable stress on Writer. If this is only a visual convenience, in simple cases, other solutions are preferable through smart configuration of paragraph styles – once again, only in particular simplistic cases.

If your source data has a “standard” structure (something like a default text, including other “objects”) which is inserted and then customised, you could record it as an AutoText. Each Autotext entry has a shortcut associated with it. You type this shortcut and hit F3 to insert it at cursor position. Thus, you ne longer need to scroll to the “model”, copy it, scroll back and paste. Much faster and user-friendly.

After selecting the navigation category (Headings in your case), click to enable the Content Navigation View toolbutton (Navigator top toolbar, 1st button from the left).

Then you’ll only see the current navigation object.

Unselect that button to get to all objects navigation back.

It works, thank you!

Thank you. It would be good to have this possibility. However, I can at least enable the Content Navigation View, as jfn writes - better than nothing.

Thank you. It would be good to have this possibility. However, I can at least enable the Content Navigation View , as jfn writes - better than nothing.