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
devguide: buggy heading numbers #61429
Comments
If you look e.g. here: you'll see that all questions are numbered "25", while the upper headings are numbered "25.1", "25.2", etc. Other places in the devguide seem fine, e.g. http://docs.python.org/devguide/stdlibchanges.html |
I noticed this before and wasn't able to fix it after trying a few things. I wonder if this is a limitation or bug in Sphinx. At the top, the FAQ page has-- :tocdepth: 2 Levels beyond 2 are getting numbered 25 (the number of the top level) instead of having their numbering suppressed (as I would expect it to). |
Georg, do you know how to fix this? |
Actually, what I meant to say is that I would expect the "tocdepth" to affect only the level of the table of contents that is displayed (which it does), but not suppress or otherwise affect the numbering of the sections in the actual text. |
Adding a patch to fix this issue. |
I had tried this, but doesn't this make the contents in the left side bar unwieldy (and perhaps also on the devguide index page) -- is that what we want? I was under the assumption that the purpose of the tocdepth directive was to avoid that. |
Yes, missed that issue. Trying to find any other solution if possible. |
I found that http://docs.python.org/devguide/stdlibchanges.html also has left side bar text with full index just like my patch does. For FAQ the problem is title texts are kind of long so they look bad. |
The only change is that '25' is now '28'. A possible solution, without changing Sphinx, is to reduce the headers to a couple of words and put the question under the header, possibly in italics. *Q. How do I do this difficult thing?* A. Do 2 pushups, sleep 3 hours, drink water, and do it. I am not sure how this would affect the linked index at the top that appears before 28.1 Communications. |
I agree with Chris, changing the tocdepth doesn't sound like the right solution. Is this a Sphinx bug? Georg, could you please take a look? |
Correct Python Developer FAQ Section 28 to match the style of Section 27. Section numbers should now flow correctly in Sphinx. A section contents is displayed at the top of the section page for the user's convenience (especially since the FAQ questions have long titles). |
Thanks! The patch doesn't address msg182641 and I think this is a Sphinx bug(or perhaps a feature request?). tocdepth should not change the heading numbers. I couldn't find any similar report on the Sphinx issue tracker. So I suggest opening an issue there and closing this one as "third party". |
Berker, Thanks for the patch review. I'm going to work with the folks at Sphinx project this week to see if the headings are fixed in a newer Sphinx version. If so, I will make the change here. If not, I will follow your recommendation to close and create an issue on the Sphinx issue tracker. |
Moved to python/devguide#11 |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: