Yes, understandable. What I don't understand: why do you need the structure you are asking for? Can you give us a real-world example for your tree structure? Why don't you simply move the three sections from B into a separate page B0? It's more intuitive for the reader when every page is *either* a node of the ToC *or* a content page with sections. A third type of page is where you have section titles and each section contains a toctree (I use this when I have a toctree node with many entries but do not (yet) want to move them to separate toctree pages.
Luc On 25.05.21 00:30, Sidney Cadot wrote: > Hi Luc, > > Thanks for the suggestion! > > The problem with a normal*..include* directive will be that I lose the > separate pages for B1 and B2 in the HTML backend (and other backends > that don't combine everything). > > When I wrote "I want to keep the 7 documents", what I meant to say is > not so much that I want to hold on to the separate source documents; I > want to make sure that individual HTML pages are generated for each of > the 7 documents. The /include/ approach//doesn't accomplish that. > > Cheers, Sidney > > On Monday, May 24, 2021 at 10:11:38 PM UTC+2 Luc Saffre wrote: > > Did you try to .. include:: the two docs B1 and B2? In that case > you must also use the exclude_patterns > > <https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-exclude_patterns> > config option to tell Sphinx to exclude them from the build. > > Luc > > > On 24.05.21 20:52, Sidney Cadot wrote: >> >> Hi all, >> >> I am having trouble getting sphinx to do what I want. >> >> I have 7 documents: index, A, A1, A2 ; B, B1, B2. >> >> The index has a toctree that lists A and B. >> Document A has a toctree that lists A1 and A2. >> Document B has three sections followed by a toctree that lists B1 >> and B2. >> >> This results in the ToC that I have attached as a picture. >> >> What I would like is that Document B1 and B2 are listed in the >> ToC at the same level as the subsections of document B. In >> effect, I want the ToC entries {B1, B2} to be direct children of >> Document B, just like {A1, A2} are direct children of A. >> >> I want to keep the 7 documents; and I want to keep everything in >> the order as stated. >> >> Is this possible? Or does the Sphinx parser and/or internal >> document datastructure not allow this for some reason? >> >> Kind regards, >> Sidney >> -- >> You received this message because you are subscribed to the >> Google Groups "sphinx-users" group. >> To unsubscribe from this group and stop receiving emails from it, >> send an email to [email protected]. >> To view this discussion on the web visit >> >> https://groups.google.com/d/msgid/sphinx-users/976e3827-35b5-4e72-ac1f-7e29da91f49bn%40googlegroups.com >> >> <https://groups.google.com/d/msgid/sphinx-users/976e3827-35b5-4e72-ac1f-7e29da91f49bn%40googlegroups.com?utm_medium=email&utm_source=footer>. > > -- > You received this message because you are subscribed to the Google > Groups "sphinx-users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sphinx-users/4cfa2a5e-7b16-4ab6-9a1b-2729da549804n%40googlegroups.com > <https://groups.google.com/d/msgid/sphinx-users/4cfa2a5e-7b16-4ab6-9a1b-2729da549804n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/02102cf5-ab77-d7f8-d6cc-af95fd62ceab%40gmail.com.
