Closed dkuegler closed 2 months ago
Thanks for the report and for the MWE which makes this easily reproducible!
Only the combination of the three then causes this bug / WARNING.
Are you sure you need all three to cause the problem?
When I remove 'nbsphinx'
from the extensions, I still get the warning.
It looks like there is already an issue at sphinx-argparse
which doesn't involve nbsphinx
: https://github.com/sphinx-doc/sphinx-argparse/issues/14
nbsphinx and autosectionlabel both try to create/embed ids for headings
nbsphinx
indeed creates section IDs (because Jupyter uses a different scheme than Sphinx):
However, this is only done for *.ipynb
source files, and not for "normal" *.rst
files:
So if I'm not mistaken, this isn't even active in your MWE.
It might lead to problems if a Jupyter notebook is involved, though?
I have done some further investigation and I know believe this is not an nbsphinx issue, but argparse. It was a bit hard to trace this issue, as it was thrown in auto section label and I subsequently searched for where labels where also created.
Hi,
I have activated nbsphinx and sphinx.ext.autosectionlabel in my sphinx documentation github.com/Deep-MI/FastSurfer and they run into a conflict.
Specifically, nbsphinx and autosectionlabel both try to create/embed ids for headings. But sphinxarg.ext already creates unique ids for each heading (but has duplicate heading names). Only the combination of the three then causes this bug / WARNING.
Please see this MWE.