for years i have been telling people not to use the table of contents tool provided by scribus.
i even worked on a new table of contents tool, which was based on the paragraph styles used in the document.
(the proof of concept did work, but among other factors, the scribus team was not willing to replace the current tool with the new one i was proposing... and i was not so eager to make the UI even more complex with two different table of contents tools!)
two weeks ago, pmj proposed a patch to support multiple levels of headings in the current TOC tool:
https://bugs.scribus.net/view.php?id=16887i suddenly thought that it might be possible to create a script that would fill the attributes by looking at the paragraph styles used in the document. and make the TOC tool a little less painful.
i wrote the script and it did work well, with a better patch for multilevel TOC it would have made the TOC tool usable... but why should i have stopped there?
here is a python script that runs inside of scribus and collects the paragraphs with specific styles (h1, h2, h3... but you can easily modify the global variable to support any naming schema you see fit) and creates a multilevel table of contents in the current frame:
https://github.com/aoloe/scribus-script-repository/tree/master/table-of-contentsit should work with any current version of scribus (except 1.4.x of course! that's not current!).
i still really think that the current TOC tool should be removed from scribus and replaced by one that is based on styles, but at least, now, there is a solution for creating a TOC in Scribus!
it does not cover all possible table of contents, but i hope that it can allow people to create (a bit more than) basic table of contents with scribus!