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
The TOC-tree in index_developer.rst is included in the final LaTeX document (and in the Table of Contents) regardless of the value of the 'release' tag. Works fine for the HTML builder (the pages 'todolist' and 'manual_guidelines' are generated but not linked from the table of contents in index.html).
Let me know if I didn't explain this clearly enough :).
The text was updated successfully, but these errors were encountered:
rryan
changed the title
.. only:: does not seem to inclusion of pages in toctree_only LaTeX builds
.. only:: does not seem to affect inclusion of pages in toctree_only LaTeX builds
Nov 25, 2015
I think only and ifconfig directive was not designed to control section and toctree. Such usage causes unexpected behaviors (refs: #1488, #1717).
I guess this issue you mentioned is one of them.
memo for dev:
In my short investigation, sphinx.builders.latex doesn't treat 'only' node on resolving time of toctree.
sphinx.builders.Builder.write treat 'only' directive by calling self.env.get_and_resolve_doctree. However, sphinx.builders.latex.LaTeXBuilder.write doesn't call Builder.write method and doesn't call get_and_resolve_doctree because LaTeX writer need to concat all toctrees by using LaTeXBuilder.assemble_doctree method instead of get_and_resolve_doctree.
I guess LaTeXBuilder.assemble_doctree should have a treating code for 'only' directive to resolve this issue.
For a LaTeX build with toctree_only set to True and a custom content only included based on a tag in the root document:
Contents of index.rst, the root document:
Contents of index_developer.rst:
The TOC-tree in index_developer.rst is included in the final LaTeX document (and in the Table of Contents) regardless of the value of the 'release' tag. Works fine for the HTML builder (the pages 'todolist' and 'manual_guidelines' are generated but not linked from the table of contents in index.html).
Let me know if I didn't explain this clearly enough :).
The text was updated successfully, but these errors were encountered: