toctree

Managing Sphinx toctrees combined with inline sections

半城伤御伤魂 提交于 2021-02-20 04:51:14
问题 I'm trying to learn how I can manage a toctree element that is located in the same file as other content. Suppose I have a thingamajig.rst chapter that looks like this: Thingamajigs ============ .. toctree:: :maxdepth: 2 foo bar baz Overview ++++++++ Thingamajigs are fun When I render it --- foo/bar/baz have their own .rst files --- it looks like this: But if I move the Overview section before the toctree, then it pushes the toctree down into the Overview section: Thingamajigs ============

How to make toctree link refer to the separate file like it refers to the subsections

喜你入骨 提交于 2021-02-15 16:35:49
问题 Structure The following structure of the project: index.rst MyProject ========= Contents: .. toctree:: group1 group1.rst Group1 ------ Subgroup1 ========= Subgroup1 contents Subgroup2 ========= Subgroup2 contents Rendered to (after clicking on Group1 -> Subgroup2 ): As you can see it opens the Group1 page and linked to Subgroup2 section. Want I want to have the same on the left side ( Group1 openned and Subgroup2 choosed) but on the right side I want to see only Subgroup2 page (page without

How to make toctree link refer to the separate file like it refers to the subsections

﹥>﹥吖頭↗ 提交于 2021-02-15 16:33:32
问题 Structure The following structure of the project: index.rst MyProject ========= Contents: .. toctree:: group1 group1.rst Group1 ------ Subgroup1 ========= Subgroup1 contents Subgroup2 ========= Subgroup2 contents Rendered to (after clicking on Group1 -> Subgroup2 ): As you can see it opens the Group1 page and linked to Subgroup2 section. Want I want to have the same on the left side ( Group1 openned and Subgroup2 choosed) but on the right side I want to see only Subgroup2 page (page without

How to make toctree link refer to the separate file like it refers to the subsections

纵然是瞬间 提交于 2021-02-15 16:31:10
问题 Structure The following structure of the project: index.rst MyProject ========= Contents: .. toctree:: group1 group1.rst Group1 ------ Subgroup1 ========= Subgroup1 contents Subgroup2 ========= Subgroup2 contents Rendered to (after clicking on Group1 -> Subgroup2 ): As you can see it opens the Group1 page and linked to Subgroup2 section. Want I want to have the same on the left side ( Group1 openned and Subgroup2 choosed) but on the right side I want to see only Subgroup2 page (page without

How do I include the homepage in the Sphinx TOC?

余生长醉 提交于 2021-02-06 09:40:08
问题 Let’s say I’ve got a Sphinx project with the following sources: index.rst installation.rst templating/ index.rst module.rst fieldtype.rst index.rst (the homepage) has the following TOC tree: .. toctree:: :titlesonly: installation templating/index I want my template to include a sidebar that lists all 3 top-level pages (homepage, installation, templating/index). I've tried adding a second, hidden TOC tree in the homepage: .. toctree:: :hidden: index .. toctree:: :titlesonly: installation

Sphinx does not recognize subfolders

若如初见. 提交于 2021-02-05 03:20:33
问题 I'm new in using Sphinx . I'm able to create HTML documentations as long as my files are in the source top folder. As soon as I'm putting them in a subfolder in the source directory , Sphinx does not include the document into the build. Sphinx tells me after generating that the test document is not included. So, it sees the file but does not include it. Did I miss anything? Do I have to specify any subfolders in the index.rst file or in the config.py ? My index.rst file: Welcome to python

How to remove bullets from numbered toctree in restructured text?

给你一囗甜甜゛ 提交于 2021-02-04 08:07:25
问题 I am using a toctree in Sphinx to automatically generate a table of contents for a webpage. .. toctree:: :maxdepth: 2 :numbered: First Second Third which creates (roughly): First Second Third I want the numbers, but I don't want the bullets. Is there some magic I'm missing that gives me the enumerated list without the bullets? 回答1: That's a minor annoyance which can be corrected with a custom style. .toctree-wrapper ul li { list-style-type: none; } To override the default style sheet, you can

Automatic toctree update

三世轮回 提交于 2021-01-27 13:00:44
问题 I'm not sure if this is possible. But I'm hoping to put multiple .rst files in a directory, and during compilation. I want these files to automatically be inserted in the toctree . How can I go about this? 回答1: You can use the glob option which enables wildcards. Like this: .. toctree:: :glob: * This adds all other *.rst files in the same directory to the toctree. Reference: "Use “globbing” in toctree directives" 来源: https://stackoverflow.com/questions/28773398/automatic-toctree-update

Collapse all :glob:-discovered files into one TOC entry

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-07 01:44:18
问题 I've got something like this: .. toctree:: :maxdepth: 2 :caption: Contents: :hidden: :glob: docs frontend backend tools/* I'd like all the documents found in the tools directory to collapse into one expandable sidebar TOC entry. Should be possible, but I can't find a clue. I use sphinx_rtd_theme . To put it another way: suppose I have a very long document like this ( tools.rst ): Section 1 ********* Subsection 1 ============ Subsection 2 ============ Subsection 3 ============ How am I

Collapse all :glob:-discovered files into one TOC entry

二次信任 提交于 2021-01-07 01:42:37
问题 I've got something like this: .. toctree:: :maxdepth: 2 :caption: Contents: :hidden: :glob: docs frontend backend tools/* I'd like all the documents found in the tools directory to collapse into one expandable sidebar TOC entry. Should be possible, but I can't find a clue. I use sphinx_rtd_theme . To put it another way: suppose I have a very long document like this ( tools.rst ): Section 1 ********* Subsection 1 ============ Subsection 2 ============ Subsection 3 ============ How am I