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

Code breaks when using :numbered: #19

Open
frankcorneliusmartin opened this issue Oct 20, 2022 · 0 comments
Open

Code breaks when using :numbered: #19

frankcorneliusmartin opened this issue Oct 20, 2022 · 0 comments

Comments

@frankcorneliusmartin
Copy link

frankcorneliusmartin commented Oct 20, 2022

Thank you for sharing this code :).

The code seems to break when using the numbered option:

.. toctree::
   :numbered:
   :maxdepth: 2
   :caption: contents:

   ...

I think it crashes because the figure numbers are also numbered per section, e.g. (2.1) instead of (1). Then this line breaks:

parentId = int(pairs['id'])

With some playing arround, I got it somewhat working by fixing the parentId to 1. I am not sure where this parentId is used for?:

try:
    int(pairs['id'])
except Exception:
    parentId = 1
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

1 participant