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

TOC entries of Domain objects are numbered #10826

Closed
mgeier opened this issue Sep 13, 2022 · 0 comments · Fixed by #10830
Closed

TOC entries of Domain objects are numbered #10826

mgeier opened this issue Sep 13, 2022 · 0 comments · Fixed by #10830
Labels
Milestone

Comments

@mgeier
Copy link
Contributor

mgeier commented Sep 13, 2022

Describe the bug

Follow-up to #10807 (comment).

I'm not sure what's the expected behavior, but it seems strange that a "section" that hasn't a number in the main text has a number in the TOC.

How to Reproduce

conf.py:

# empty

index.rst:

Main Page
=========

.. toctree::
    :numbered:

    domain-objects

domain-objects.rst:

Domain Objects
==============

This section is numbered (as expected).

The following "section" is not numbered, since it isn't really a section
(again, as expected).

However, in the TOC in the sidebar, it is numbered (maybe surprisingly?).

.. py:function:: a_function(an_argument)

    This is a function.

A Subsection
------------

This subsection is numbered (as expected).

Expected behavior

  • number in text -> number in TOC.

  • numberless in text -> numberless in TOC.

  • consecutive numbers in text (not skipping one)

Your project

https://insipid-sphinx-theme.readthedocs.io/en/sphinx5.x/showcase/api-doc.html

Screenshots

image

OS

any

Python version

any

Sphinx version

5.x branch, after #10807

Sphinx extensions

No response

Extra tools

No response

Additional context

No response

@AA-Turner AA-Turner added this to the 5.2.0 milestone Sep 14, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants