You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
the table of contents in epub file is too long #57491
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:
assignee=Noneclosed_at=Nonecreated_at=<Date2011-10-28.10:08:26.173>labels= ['3.8', 'type-feature', '3.7', 'docs']
title='the table of contents in epub file is too long'updated_at=<Date2019-04-11.07:05:55.502>user='https://bugs.python.org/wrobell'
the table of contents in python documentation epub file is very very long. it takes several long minutes to jump from first page to a part containing language reference toc.
imho it would be great if first page of epub file contained pointers
to tutorial, lang ref, mod ref without detailed table of contents as it is at docs.python.org.
Thanks for the report. I do not know if this something that we can fix in the CPython repository by editing some template or config file or if it requires a patch to Sphinx first. Georg?
Not sure if this is filed elsewhere, but the contents on the page at https://docs.python.org/3/contents.html could really use a collapse button, and could start automatically collapsed. The first half of the page is "What's new" for the past few Python versions and the Changelog.
I looked around for an issue in the upstream tracker and didn't see one https://github.com/sphinx-doc/sphinx/issues - I don't know much about Sphinx but it seems like it should be possible with a bit of Javascript and CSS.
Activity
wrobell commentedon Oct 28, 2011
the table of contents in python documentation epub file is very very long. it takes several long minutes to jump from first page to a part containing language reference toc.
imho it would be great if first page of epub file contained pointers
to tutorial, lang ref, mod ref without detailed table of contents as it is at docs.python.org.
merwok commentedon Nov 12, 2011
Thanks for the report. I do not know if this something that we can fix in the CPython repository by editing some template or config file or if it requires a patch to Sphinx first. Georg?
jcrben commentedon Apr 11, 2019
Not sure if this is filed elsewhere, but the contents on the page at https://docs.python.org/3/contents.html could really use a collapse button, and could start automatically collapsed. The first half of the page is "What's new" for the past few Python versions and the Changelog.
I looked around for an issue in the upstream tracker and didn't see one https://github.com/sphinx-doc/sphinx/issues - I don't know much about Sphinx but it seems like it should be possible with a bit of Javascript and CSS.
m-aciek commentedon Jun 30, 2025
I think we should decrease table of content depth to 2 (or 1?) for EPUBs. There's a setting for that in Sphinx.
willingc commentedon Jun 30, 2025
Great suggestion @m-aciek. Thanks for pointing out the config setting. I wasn't aware it existed.
StanFromIreland commentedon Jun 10, 2026
@m-aciek want to submit a PR? :-)
merwok commentedon Jun 10, 2026
This is tagged as feature, but we should consider backporting a fix if it’s only a setting change and is a clear improvement.
gh-57491: Reduce the EPUB table of contents depth to 2 (#158105)
[3.13] gh-57491: Reduce the EPUB table of contents depth to 2 (GH-158105
[3.15] gh-57491: Reduce the EPUB table of contents depth to 2 (GH-158105
[3.14] gh-57491: Reduce the EPUB table of contents depth to 2 (GH-158105