0

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
   folder/subchapter2


Chapter introduction
--------------------------
Brief introduction...

This works as intended in my html output - but for my latex build, I'm getting the following order when building my pdf:

My chapter title
subchapter1
[contents of subchapter 1]
subchapter2
[contents of subchapter 2]
Chapter introduction
Brief introduction...

The intended order would be as below:

My chapter title
Chapter introduction
Brief introduction...
subchapter1
[contents of subchapter 1]
subchapter2
[contents of subchapter 2]

Is there some way to tell sphinx via the conf.py that this should be the ordering?

bad_coder
  • 11,289
  • 20
  • 44
  • 72
mfcss
  • 1,039
  • 1
  • 9
  • 25

1 Answers1

0

I found the solution was simply to move the toctree down below the content.

mfcss
  • 1,039
  • 1
  • 9
  • 25