epub export and index

hi,
I have a book properly formatted with chapters and sub chapters titles.
However when I tried to export in epub, the table of contents has only chapters, no sub chapters.
I’m wondering if it is so by design or if it is a bug.
The test is easy to design: create a new document, insert chapters with subchapters, export it as epub and then read it in any epub reader.
bye.

Ubuntu 20.4 and libreoffice 6.4

I asked a friend of my a fourther check: win10 and LO7 return the same result.

I tried another possibility: I imported my odt test doc in Google docs then I exported/downloaded it as epub and verified that an epub viewer correctly shows the table of contents. So definitly I found if not a bug at least a missing function in libreoffice. Bye.

Just to close the question, I just discovered that this is a known bug of libreoffice.

Edit your question to mention your OS and LO version.

How do you style your chapter and subchapters (which paragraph styles)? Is the TOC automatically built?

Don’t use an answer which is reserved for solution. A question must always be improved with an edit.

Hi

Had you tried with Sigil?

Start Sigil, install libreoffice importer plugin and try to import your document
If it works it’s a libreoffice bug, if it doesn’t work it’s easy to find why

As requested: Sigil is THE program to work with epub. https://sigil-ebook.com/

This is not a definitive answer to the problem. Please, use the more link to repost as a comment.

This is an answer to the problem. Maybe not the best, maybe not the only one but it’s a possible solution.

@LordMax: if this offers a solution, tell the vast majority of users what “Sigil” is (5-10 words are enough).

if someone create epub and don’t know what Sigil is we have a big problem.

Dear LordMax, ajlittoz is right: your advice is not the solution. Maybe is a work around. A workaroud like the method I use to produce epubs since many years ago from inside libreoffice: the writertoepub libreoffice extension. I decided to try the builtin export libreoffice function instead because writertoepub is not compatible with the release 6.4.6.2 of libreoffice I only recently installed,
Now I’m considering to replace this release of libreoffice with an old one compatible with writertoepub because I want something in libreoffice to convert my document in epub. I do not want to use other applications (like sigil that I know very well).
bye.

At this time, there is no solution that is strictly within the LibreOffice program. Here is how I solved the issue], granted that others might have different needs. Creating an Epub file with a clickable TOC using Libreoffice and Google Docs