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

PDF 'howto' documents have an incoherent default LaTeX tocdepth counter setting #4330

Closed
jfbu opened this issue Dec 21, 2017 · 0 comments
Closed

Comments

@jfbu
Copy link
Contributor

jfbu commented Dec 21, 2017

For 'manual' document, the Sphinx latex class file does \setcounter{tocdepth}{1} which gives this kind of table of contents:

capture d ecran 2017-12-21 a 09 05 11

which contains two levels (\chapter and \section).

But for 'howto' documents which are supposedly shorter ones, Sphinx latex class does no special setting hence the LaTeX article.cls default of \setcounter{tocdepth}{3} is not modified, giving this result:

capture d ecran 2017-12-21 a 09 05 31

i.e. we see section, subsection and subsubsection. Moreover Sphinx modifies for LaTeX secnumdepth the original default of 3 (which would have given a numbered subsubsection) to 2, producing unnumbered subsubsection hence a strange look of the TOC above.

Reproducible project / your project

test_secnumdepth.zip

Environment info

  • OS: Mac
  • Python version: 3.6.3
  • Sphinx version: 1.6.3, stable, master
@jfbu jfbu added this to the 1.7 milestone Dec 21, 2017
jfbu added a commit to jfbu/sphinx that referenced this issue Dec 21, 2017
…#4330)

Memo: for Japanese documents, jreport.cls already does that, so this
commit changes nothing. However as the class uses ``\chapter``, this
means that by default howto documents table of contents in PDF have
three levels, whereas manual documents only  have two.
jfbu added a commit that referenced this issue Dec 21, 2017
Set LaTeX default tocdepth to 2 for howto documents (fixes #4330)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant