Issue with numbering when using 'toctree' and 'numbered' in generating html

26 views
Skip to first unread message

Jim Kennedy

unread,
Nov 15, 2021, 5:04:52 AM11/15/21
to sphinx-users
Hi there, 

Apologies if this is a silly question or a known issue with a known fix. I can't seem to find the answer.

I am building variants of a Developer Guide from a common folder. I'm basically calling different files into different sections using toctrees and displaying on my html index page. It looks like this:

Developer Guide

1. Device Introduction
2. How to build
3. Build example

Shorter Developer Guide

1. Device Introduction
3. Build example

In the second version (Shorter Developer Guide) the numbering (3. Build example) should be 2. Build example. It seems as if the number 3 is 'inherited' from the first listing. Is there a way to force the numbering I want, in this case '2'?

The source code looks like this:

.. toctree::
   :maxdepth: 1
   :caption: Developer Guide
   :numbered:
   
   howto/howto-guide/howto-developer-guide/device-introduction.rst
   howto/howto-guide/howto-developer-guide/How-to-build.rst
   howto/howto-guide/howto-developer-guide/build-example.rst

.. toctree::
   :maxdepth: 1
   :caption: Shorter Developer Guide
   :numbered:
   
   howto/howto-guide/howto-developer-guide/device-introduction.rst
   howto/howto-guide/howto-developer-guide/build-example.rst

Thanks in advance.
Apologies again for the newbie question!

Jim.

Jim Kennedy

unread,
Jan 13, 2022, 8:14:01 AM1/13/22
to sphinx-users
In the end I 'solved' this issue by removing the number entirely.
Reply all
Reply to author
Forward
0 new messages