How do you make an individual table of contents for every chapter at the start of a document?

I’m writing a long document with several chapters. It’s a document intended to be searched through quickly (code documentation), so I want to have all the table of contents at the start. To create a table of contents for a chapter the only way I know of so far is to have said table of contents in the chapter, how do I make it so that a table of contents at the start of the document displays the contents of some chapter further in the document? Thanks.

My platform is Arch Linux, I’m using Writer 24.2.0.3 (x86_64). I’m using Writer’s native save format.

?? Just place the table of contents between title and first heading and trust LibreOffice to get the references right, if you use heading1, 2 etc. Note you can also right click inside the toc and select “update” to integrate newly added chapters.

What do you mean exactly? It seems you want a chapter TOC for every chapter at start of document. Isn’t that simply a global TOC?
Then your document can be structured as:

  • global TOC (generated as usual)
  • for every chapter, its heading followed by the chapter TOC

    If this is not what you want, edit your question to illustrate it with an outline of the intended layout.