How do I use the same subsection title in multiple sections of sphinx/rst?
I didn't think this was an odd use case. I just want to iterate through the same subsection titles for each section.
############
TITLE OF ALL
############
-------
CHAPTER
-------
SENARIO ONE
===========
Description
-----------
SENARIO TWO
===========
Description
-----------
Generates this error:
design_spec.rst:19: (INFO/1) Duplicate implicit target name: "description"
Surely I'm not expected to come up with unique subsection titles throughout the whole document. What did I miss?
It's complaining about the implicit target name generated by the titles not being unique. What can I do about that?
You can avoid the info if you define an explicit target name for the second (and third ...) section "Description" like this:
...
Description
-----------
SENARIO TWO
===========
.. _description2:
Description
-----------
...
This additionally gives you the benefit of having a known anchor if you want to jump there (like mypage#description2).
Don't miss the blank line between _description and the following section title.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With