Questions tagged [toctree]

Use this tag for questions about the toctree Sphinx directive. This directive is used to interconnect documentation files, other toctrees, and tables of contents.

.. toctree:: is a directive of the Python Sphinx document generation tool used to interconnect documentation files, other toctrees, and tables of contents.

This tag serves to distinguish questions specific to the specialized Sphinx .. toctree:: directive from other tables-of-contents (ToC) that may coexist, or be generated, in the same context. For example the reST ToC directive, or a LaTex ToC among others, in which case the generic should be used.

Additionally, this tag serves to filter questions that -altough textually containing the word "toctree"- are not about the directive in itself.

This tag can stand alone, but should be used in conjunction with the parent tag .

For official documentation on the .. toctree:: directive.

160 questions
0
votes
2 answers

How to comment out a toctree entry with Sphinx?

I am new to Sphinx and I don't seem to find the way to achieve this. I want to be able to quickly comment/uncomment single toctree entries as I progress, without having to remove the line. I use to do this in Latex to reduce the compilation time…
Martí
  • 571
  • 6
  • 17
0
votes
1 answer

How to change titles in a toctree using glob?

I use in my sphinx project a toctree with glob option and I want to show different titles than the H1 of my file or the name of the file with using Titlesonly as option of toctree. Here is a snap of my code : in the index.md there is README.md files…
BARIK FATI
  • 29
  • 9
0
votes
1 answer

How to place included rst content from toctree after parent content in Sphinx latex

I'm writing a sphinx documentation for use in generating both html and latex output. Some of my rst files are structured as follows: My chapter title ===================== .. toctree:: :hidden: :maxdepth: 2 folder/subchapter1 …
mfcss
  • 1,039
  • 1
  • 9
  • 25
0
votes
0 answers

How to display only .rst headers in Sphinx sidebar navigation?

I'm creating a documentation in Sphinx using this theme: https://github.com/romnnn/sphinx_press_theme I'm having trouble achieving the intended navigation sidebar, which should ideally reflect the headers of each of my .rst files - e.g.: Contents: …
mfcss
  • 1,039
  • 1
  • 9
  • 25
0
votes
1 answer

How to include a link to index.html of content generated by another program in reST

My RST directory looks like this: . |-- Makefile |-- build | |-- doctrees | `-- html | |-- codecov <-- Generated by coverage.py | |-- index.html | | .... <-- Generated by Sphinx |-- make.bat `--…
user4979733
  • 3,181
  • 4
  • 26
  • 41
0
votes
0 answers

Global toctree shared across pages

Lets say I have two .rst files, a welcome page (the index) and an API page. I would like them both to have identical toctrees, so it is easy to navigate from the one page to the other. index.rst: Welcome! ======== Welcome to these awesome…
Maarten-vd-Sande
  • 3,413
  • 10
  • 27
0
votes
1 answer

How to prevent automatic toctree entry numbering?

I am building my documentation with Sphinx, to use with readthedocs.io. So far this always worked well. I'm orienting myself at the (in my opinion) excellent documentation of the godot engine. Since I appreciated the titles in the documentation of…
Baut
  • 59
  • 3
0
votes
1 answer

How to include both external files and sections from the index into the sphinx toc?

I am building my python package documentation with sphinx but I having some trouble to add to the table of contents both entries from other files in the docs folder and other sections present on the index.rst. These are my docs folder contents: $ ls…
0
votes
1 answer

Same level in toctree and navigation bar with separated files

I want to separate my files hierarchy from my document hierarchy, I want to have four sections of the same level in different files, two in the same file and two in separated files, at the end i want the toctree refer to them in the same…
Nazime Lakehal
  • 1,542
  • 1
  • 11
  • 15
0
votes
1 answer

Menu entry in toctree expands/collapses on click and doesn't change page content?

As per the title, is it possible to have a menu entry where the entire entry acts like the +/- for expanding and collapsing and doesn't change the active page? A bit like when you are already on the actual entry and click it again it only…
mje
  • 3
  • 1
0
votes
0 answers

Documentation link issue in toctree

I have one file with the following content. .. toctree:: :includehidden: :titlesonly: Getting_started <./docs/Getting_started> Which gives the Getting_started link as href="docs/Getting_started.html" but I want to have this link as below…
Dushyant Joshi
  • 3,672
  • 3
  • 28
  • 52
0
votes
0 answers

Set toctree structure one at a time in document, then display full toctree on same document

I want to be able to set toctree documents one at a time in my document, then on the same document redisplay the toctree. Textually, my question is hard to understand, so just refer to my example. This is my current document called…
JigsawCorp
  • 479
  • 2
  • 6
  • 15
0
votes
1 answer

Sphinx autosummary link to imported member documentation

I'm trying to document a somewhat complex python package it has several private submodules i.e. package +-- __init__.py "Package Initialization" +-- _info.py "Package Info" +-- _core.py "Packages Core members" +-- _extra1.py "Package Extra…
Glen Fletcher
  • 644
  • 5
  • 21
0
votes
1 answer

All create toctree in rst files

I have 2 rst files: folder: |_file1.rst |_file2.rst file1.rst: .. toctree:: :maxdepth: 3 Name1 ======== Name2 ======== file2.rst: .. toctree:: :maxdepth: 3 Name3 ========= Name4 ========= How to make so that in a tree to combine…
markus
  • 9
  • 1
0
votes
1 answer

Hierarchical documentation in Sphix

I am trying to generate a hierachical documentation in Sphinx. I would like the following structure: Introduction Quick start Weather API (one general page + 2 subpages) Temperature Humidity Sky API (one general page + 3 subpages) Planets …
Jirka
  • 4,184
  • 30
  • 40
1 2 3
10
11