I have a sphinx documentation project that I use to generate an HTML (make html
) and a PDF (make latexpdf
) version of the documentation. I use subdirectories to organize some of the pages. My directory structure is something like this:
source/
index.rst
page1.rst
subsection1/
index.rst
subpage1.rst
I have a toctree specified in both index.rst files:
# index.rst
.. toctree::
page1
subsection1/index
# subsection1/index.rst
.. toctree::
subpage1
When I generate the HTML the subsection1/index
page has the TOC list with links to the appropriate pages. When I generate the latex PDF it ignores the sub-toctrees and doesn't print anything, but I would like it to be the same as the HTML.
I don't have a lot of experience with latex and I'm having trouble finding anything online about this so I feel like I'm missing something obvious. I've looked in to .. contents::
and .. include::
but of course this doesn't produce what I want with HTML and I was hoping I wouldn't have to have a ton of .. only::
parts.