-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
Milestone
Description
Figure numbering isn't restarted when encountering a new top-level toctree directive, even when :numbered: is set on the directives and numfig = True and numfig_secnum_depth = 1.
For example, with this index.rst:
.. toctree::
:hidden:
:caption: General
:numbered:
definitions
procedures
.. toctree::
:hidden:
:caption: User Manual
:numbered:
manual_section1
manual_section2
If there's a figure somewhere in/under definitions.rst or procedures.rst, figure numbering in the user manual will not start at 1.
I'm not sure this is a bug per sé, but it's something that I experienced as unexpected. It's hard to say what the correct behavior would be because it's not clear in general how multiple top-level toctree directives should be interpreted/represented (see #4733 and #4977, for example).
Environment info
- Python version: 3.6.9
- Sphinx version: 3.2.1
markgalassi, alext-w and mini-1235