Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem ТОС generation #4

Open
abel-msk opened this issue Aug 11, 2019 · 1 comment
Open

Problem ТОС generation #4

abel-msk opened this issue Aug 11, 2019 · 1 comment

Comments

@abel-msk
Copy link

Hi. Very useful extension, but I got the problem with TOC.

In generated docx document there is not any entry in the toc table (except the toc header). I try to update TOC in the Ms Word and got the error 'No table of contents entries found.' with popup (see image)
Screenshot 2019-08-11 at 21 21 02
This say - I have not any title with heading style. But it is incorrect. My document has many headers in their body.
Screenshot 2019-08-11 at 20 56 51

I Use Word for macos
Screenshot 2019-08-11 at 21 25 34

It seems some toc generations error on macos.
If I delete this TOC and generate new one inside MSWord, toc generated correctly.

This is generated docx document

@amedama41
Copy link
Owner

Maybe, this is because the headers are arranged outside toctree directive.
Docxbuilder includes headers only included by toctree directive into TOC (This is same behaviour as HTML builder).
For example, TOC generated from bellow code will not include "Title1", but include "Title2" and "Title3".

index.rst:

.. toctree:

   contents

Title1
======

contents.rst:

Title2
======

Title3
======

Could you move the contents outside toctree into other file, and include the file by toctree directive?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants